Write a Pseudo Code to find the angle between two hands of a
clock for a given time.

Answer Posted / fanatic

#include<stdio.h>

main()
{

int hr,min;
double angle;
printf("Enter hour and minute in 24 hr format\n");
scanf("%d %d",&hr,&min);
angle=30*hr+(double)min/2-min*6;
if(angle<0) angle*=-1;
while(angle>180) angle-=180;

printf("%.2f\n",angle);
return 0;
}

Is This Answer Correct ?    3 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me the jobs for the MCA Fresher in delhi, Noida..

1899


how do u handle table control inbdc explain the process in steps iwant the answer in urgent please forward this even i know how to explain there

1743


What is the use of sas software? Is sas and sap are different?

1008


Given n red balls and m blue balls and some containers, how would you distribute those balls among the containers such that the probability of picking a red ball is maximized, assuming that the user randomly chooses a container and then randomly picks a ball from that.

577


how can we implement locks in plsql?

1781






what is the software to run the GSM gate opener program

1647


9.Difference between even and odd signals?explain with the diagram?

2951


what is the BAM? where we can use it in BizTalk server?

1349


What is Negative testing?

1494


I need to fetch all rows from the table based one field value in the table and later do a condition check if the condition is true I will have to move all the rows present in the data base to output file one else if the condition is not satisfied then move all the records of that field value into another file .Please let me know how to do that

1645


I want Ada programming language books. Could anyone post me any link for that?

2940


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

1400


the systematic access of small computers in a distributed data processing system is referred as?

2712


What sysoption determines where the macro facility searches a specific catalog for complied macro?

1644


i want to improve my english vocab for racking campus written exam plz tell me best book for prepration......

1700