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
what are all the ant command options
Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.
What is the use of sas software? Is sas and sap are different?
could you please tell me how to draw the calibration curve for HPLC {the software which we are using}?
Delta 5 weight scale not connect with oracle application what i can do?
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
how to add Servlet-api.jar file into eclipse 3.3.2 ?
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.
What are two of your strengths that you will bring to our QA/testing team?
what is the software to run the GSM gate opener program
Diff between IF and where ?
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.
what is diff bet ref variable & instance of class
I want Ada programming language books. Could anyone post me any link for that?
what is the use MDM(Master Data Management)and meaning