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
what is the purpose of checked Menu options
Tag for turning an image into a hyperlink is
how can we maintain the previous version scripts to new version.
how pseudo column works?
What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
How to change the color of a cell or a row in a datagrid on mouse hover using javascript/.net
how to remove header and footer in jcl using sort utility
What are the Short cut Keys of Tally ERP?
Explain three modes in which files can be accessed from python program
what is meaning of MDM in sap?let me know that meaning
What is the difference between CLEAR & RESET and OPEN & CLOSE OPCOEDS(USING RPG/400).wheare we can use this?can any body tell me in real time senario with example please?
what is the work of 1tier,2tier,&ntier? Plz Explain it!
what is the difference between Windows application and Unix application?
what do u mean by tagging
the systematic access of small computers in a distributed data processing system is referred as?