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

what is the similarity between networking devices?

1678


why not instantiating servet using new operator?

1498


What do you understand by modular programming?

670


in IT trend mantis meant what? how to know mantis in IT trends? detail description about mantis?

1648


how CLR identify vb file?

2500






i am getting the error while compiling my cics program with including db2 dclgen member it is showing that ur dclgen member not including and all the host variables are undeclared

1093


Why did you ever become involved in QA/testing?

1608


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

1903


define profiler???

1608


what is the certificates in biztalk?

1430


What is SAP TAO? · Which Version you are using? · What is the Latest Version in SAP TAO? · What are the Advantages in SAP TAO? · What are the Patches required for SAP TAO? · What is BPT? · Difference between BPT & SAP TAO? · Which Framework using for SAP TAO? · What is CBASE? · What is the SAP TAO Architecture? · What are the Prerequisites for SAP TAO? · SAP Solution Manager Mandatory for SAP TAO 1.0? · SAP Solution Manager Mandatory for SAP TAO 2.X? · What is UI Scanner? · What is Inspector? · How many ways to Create a components using TAO 1.0? · How many ways to Create a components using TAO 2.x? · Which service pack required for SAP TAO 2.7? · What is Import/Export? · What is Consolidate?

2391


It is possible to take number of controls added to form at run-time.ex-when user enter 6, 6 text boxes get added to form,next time number of controls get change as per user number enter. What is code for that?

1509


Suppose server object is not loaded into the memory, and the client request for it , what will happen?

2172


what is the work of 1tier,2tier,&ntier? Plz Explain it!

2041


Write a program to show polymorphism.

699