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 extension of SPDS Dynamic cluster tables?
can we use commit,rollback in triggers and how?
iam confused among testing ,.net and java. can anybody help me.
How to know we are in home page of a web application using QTP
smal talk is pure object oriented or not?
how pseudo column works?
the systematic access of small computers in a distributed data processing system is referred as?
purpose of abstraction and interface
what is the purpose of checked Menu options
Suppose we are doing 4 operations on database using service, first operation is successful but due to some reason remaining 3 operations are failed. I) is this transaction successful or not? ii) How can you give that error message to user?
Hey this is venkatesh.Please can any body tell me what is SFLNXTCHG?where we use this keyword?what perpuse we use this?Can you tell me in real time senario with example? And in 7 specification(RPG/400)what is the mandatory specification using programs?
Which CRM is better to opt, Sebiel CRM or Salesforce CRM or sap CRM? which institute is best one in hyderabad
public static void main(String args[]) describe it
hai i am prasanna.I am MCA 2009 fresher.tell me about certifications.which certification helps me to improve my carrier and to get a technically oriented job ,which certification helps to get job faster.
5.Call by value and Call by reference with program?