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
How can we develop a multi-tier application in Java?
what are the differences between CONS, LIST, and APPEND
difference between mantis and other tools?
Explain with examples any 2 features of OOPS.
how to display xisheet in list box in c# .net
Diffrence between 2.0,3.0,3.5,4.0. versions of .net?
how CLR identify vb file?
I m Abdullah Ansari compleated MCA from Jamia Hamdard,i have appeared the test of IBM on 2 august at oxford college of engineering Bangalore.waiting for hr round.. This is the first round for IBM.02/08/08 Paper consists of 4 sections 15 questions from matrices(time very less but no negative marking). 25 questions from series completion section (this section is very easy but negative marking) 15 questions from aptitude(little bit tough time limit 15 minute negative marking) 4th section is from computer science (c,c++,operating system,digital electronics ,basic question..) result came at 3 o'clock.i was selected... In interview they asked questions like 1 they asked about final yr project.. 2 what are dynamic and static memory location? 3 linked list and array difference between them. 4 what is function ? what is difference betwen function and inline function? 5 about structure 6 about binary tree, traversal, call by value. 7 storage class and many more basic questions..
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 tasks performed by a Team Lead
through which algorithm does the garbage collector works? how the garbage collector will understand that the object will going to be deleted?
where is available in this mantis toturials?
Define Form modules, Class modules and Standard modules
Write a pascal program to calculate the sum of the first 100 even number and odd number
what is the BAM? where we can use it in BizTalk server?