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
I need source code for Enrollment System using Visual Basic 6.0/2008 database MS Access 2007 for my school thesis project...please help me..kindly send in my email jpinedamcp@gmail.com
THERE ARE 4 SOURCE FILES WHICH CONTAINS SAME METADATA CREATE A TARGET THAT SHOULD DISPLAY THE FILE NAME ALONG WITH THE RECORD PLEASE SEND THE ANSWERFOR THIS QUESTION WITH MAPPING
how can i create report in abap to insert data in table pa0002 using insert command
what is adodb??y it is used for connection of V.B and access??what is ado?dao?
Have you used callsymputx? what points need to be kept in mind when using it?
Explain what is OOPS and its concepts?
it is a language or tools?
what is meaning of MDM in sap?let me know that meaning
what is web service in java? have u use before.
what is throws keyword
hi..this is kartheek..complted mca in 2009..but i dont have knowledge in programing..but to learn new language.. which one is suitable for me?is SAP or IBM mainframes is suitable for me..?if it suits how much will it costs..?pls answer...
what is the last ant version you worked?how to get it
hi i m deepak my shedule for NIC pi is 17 Apr please contact me if anybody has interview on same day or give me some idea who have faced
Difference between views and index in sas programming
What is the use of Differ interface check box in Ship confirm?