Write a Pseudo Code to find the angle between two hands of a
clock for a given time.

Answer Posted / mamun

#include<stdio.h>
int main()
{

int angle,hour,minute;
printf("Enter the hour: ");
scanf("%d", &hour);
printf("Enter the minute: ");
scanf("%d", &minute);

if(hour > 12) // In case of 24 hour clock
{
(int)angle = hour * 30 - minute * 6;

if(angle > 180)
angle = 360 - angle;
printf("%d\n", angle);
}
else
printf("bye\n");

return 0;
}

Is This Answer Correct ?    2 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

design a counter with the following repeated binary sequence: 0, 1, 2, 3, 4, 5, 6, 7, 8 using JK Flip Flop.

16237


what are importance in problem tracking

1623


how will you code the subfile which is in editing mode (multiple case subfile)?

1604


Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fit" instead of the number and for the multiples of five print "Bit". For numbers which are multiples of both three and five print "FitBit".

1957


Is class is a abstract datatype in java?

1455






What is the purpose of element of in Ajax

2015


suppose we have ten members of a physical file but we want the output of last 5 members only.how to achieve that?

1496


Write a program to create a process in UNIX

2094


What is BASIS

1670


what are all the validation we need to perform in data stage?

1950


what is apt_dump_score in datastage where it is useful

1504


what are the 3 forms of a prolog term

2757


what are other resources are needed for this mantis?

1522


I am work in it aompenei

975


Can i please VHDL code for D-Latch with clear input ?? (HINT: Set up a “Process” with appropriate sensitivity list to get the desired D-Latch with Clr working.) Inputs and Outputs: entity Lab4b is Port ( Clr, Clk, D : in STD_LOGIC; Q : out STD_LOGIC); end Lab4b;

994