Write a Pseudo Code to find the angle between two hands of a
clock for a given time.
Answer Posted / spacious mamun
#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
hour=hour+12;//to make the hour in 24 hour format;
{
(int)angle = hour * 30 - minute * 6;
if(angle > 180)
angle = 360 - angle;
printf("The angle between the two handle is: ");
printf("%d\n", angle);
}
return 0;
}
| Is This Answer Correct ? | 12 Yes | 11 No |
Post New Answer View All Answers
hi, all this is shoba m.c.a . i have learned abap but no oppurtunities right now as fresher , right now i want to learn any course on demand any one pls suggest me good course and institute in hyderabad
1) How can u create the table?
i am exeprienced person what is selection process
diffrence between oracle apps , .NET , SAP
When we delete logfiles such as screenshots how does it affect the ldf file? Ive seen huge change while adding screenshots in the ldf file but a very minor one deleting them.Please Explain
What is %Type,%Rowtype?
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.
When you deliver your C++ headers and C++ library of a class (what all can you change in the class so that application using your class does not need to recompile the code)
Hello Experts, What is the difference between move and move corresponding exactly? please post me asap
< No Frames > tag is used for
Write a pascal program to calculate the sum of the first 100 even number and odd number
1. How many jobs can we write in a single file? 2. How many maximum members can exist in a single partition data set(pds) in jcl?
sample code for data transfer between two r/2 systems and r/3 systems?
how do i create my own exception class which will restrict IO exception?
Busy waiting is a method whereas a taskwaits for a given event by continiously checking for an event to occur. What is the main problem with this approach