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

Answer Posted / spacious 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
hour=hour+12;//to make the hour in 24 hour format;
{
(int)angle = hour * 30 - minute * 6;

if(angle > 180)
angle = 360 - angle;
printf("The angle between the two handle is: ");
printf("%d\n", angle);
}

return 0;
}

Is This Answer Correct ?    12 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are all the ant command options

1503


Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.

618


What is the use of sas software? Is sas and sap are different?

1008


could you please tell me how to draw the calibration curve for HPLC {the software which we are using}?

1280


Delta 5 weight scale not connect with oracle application what i can do?

1801






When we delete logfiles such as screenshots how does it affect the ldf file? Ive seen huge change while adding screenshots in the ldf file but a very minor one deleting them.Please Explain

1400


how to add Servlet-api.jar file into eclipse 3.3.2 ?

4045


Given: coordinates of rectangle-> left bottom and right top points. the rectangles create a hole.Find the maximum area of the hole. eg. 4 rectangles create a hole in between. find its area.

1967


What are two of your strengths that you will bring to our QA/testing team?

1632


what is the software to run the GSM gate opener program

1647


Diff between IF and where ?

1612


Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 2 numbers. Find the missing numbers.

780


what is diff bet ref variable & instance of class

1540


I want Ada programming language books. Could anyone post me any link for that?

2940


what is the use MDM(Master Data Management)and meaning

1901