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
i am exeprienced person what is selection process
I want to pass .pdf files as OlE Object to crystal report through VB6. Please any one guid me...
in network security,how we identified threat?some one say we found threat according to it's signature,but how we get signature or pattern of the virus?
what is an INI file?
Hi All, Can any one please send me the difference between informatica 7i and 8i versions, Thanks in advance. vinod
How to create a new dataset only duplicate observations in proc sort procedure?
how does database connection using ADO.NET?
difference between mantis and other tools?
Write a pascal program to calculate the sum of the first 100 even number and odd number
3 members in a pf.how we read 3 members without using ovrdbf.using rg pgms....
what is adodb??y it is used for connection of V.B and access??what is ado?dao?
what is integration testing in real time applications?
what is the difference between Windows application and Unix application?
I want to insert date in the form of yyyy-mm-dd... if any changes happen while inserting date format want to show error meg...any one can solve this..??
How to set on/off a group of indicators in a single statement?