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


Please Help Members By Posting Answers For Below Questions

i am exeprienced person what is selection process

1131


I want to pass .pdf files as OlE Object to crystal report through VB6. Please any one guid me...

2596


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?

1519


what is an INI file?

1596


Hi All, Can any one please send me the difference between informatica 7i and 8i versions, Thanks in advance. vinod

1536






How to create a new dataset only duplicate observations in proc sort procedure?

1614


how does database connection using ADO.NET?

1522


difference between mantis and other tools?

1620


Write a pascal program to calculate the sum of the first 100 even number and odd number

3965


3 members in a pf.how we read 3 members without using ovrdbf.using rg pgms....

1673


what is adodb??y it is used for connection of V.B and access??what is ado?dao?

1775


what is integration testing in real time applications?

1847


what is the difference between Windows application and Unix application?

2158


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..??

1661


How to set on/off a group of indicators in a single statement?

1379