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

In loading programs into memory, what is the difference between load-time dynamic linking and run-time dynamic linking?

1616


Colors specified with the notation

1815


Given: coordinates of rectangle-> left bottom and right top points. the rectangles create a hole.Find the maximum area of the hole. eg. 4 rectangles create a hole in between. find its area.

1983


1) How can u create the table?

1377


Mainly Related to Oracle, DBMS , Oracle Stored Procedures, Functions, Oracle 9i Architecture, Redo logs..., Views,

1869






suppose we have ten members of a physical file but we want the output of last 5 members only.how to achieve that?

1498


Given a cube of size n*n*n (i.e made up of n^3 smaller cubes), find the number of smaller cubes on the surface. Extend this to k-dimension.

681


What is test execution and when will we start execution please send me one example for this question

1433


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

1712


Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fit" instead of the number and for the multiples of five print "Bit". For numbers which are multiples of both three and five print "FitBit".

1959


what is best way to create a Thread class & why?

1594


how do you generate source code for the automatic generation for receipt number

3833


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

3971


how do i add a column dynamically in a table by using java application?

1553


what is the software to run the GSM gate opener program

1662