Write a Pseudo Code to find the angle between two hands of a
clock for a given time.
Answer Posted / samer el-haj-mahmoud
#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 / 2 - minute * 6;
if(angle > 180)
angle = 360 - angle;
printf("%d\n", angle);
}
else
printf("bye\n");
return 0;
}
| Is This Answer Correct ? | 6 Yes | 6 No |
Post New Answer View All Answers
it is a language or tools?
Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming
what is the work of 1tier,2tier,&ntier? Plz Explain it!
Is there any standard procedure to test the application as a whole? Or How can I test complete application right from the requirement gathering?
what is delegate and delegation model give the real live example on delegate model
what are the advantages of sap on other software ?
how to fin top two miximum values in sql? not 2nd both max value of 1st and 2nd both have to find out
what are the things i had to say in personal introduction in hr round mail me to prasanna.1867@rediff.com
what are the topics choosen for jam round for interviews
Find out the list of roles which gives access to GUI activities? thanks in advance
What is the Difference between in memory database and physical database
what is the difference between rename and label
hii I inntrested abt scjp certification but i dont knw abt scjp plz send details abt scjp exam and syllabus.
give idea for creating screen in abap
in network security,how we identified threat?some one say we found threat according to it's signature,but how we get signature or pattern of the virus?