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
In loading programs into memory, what is the difference between load-time dynamic linking and run-time dynamic linking?
Colors specified with the notation
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.
1) How can u create the table?
Mainly Related to Oracle, DBMS , Oracle Stored Procedures, Functions, Oracle 9i Architecture, Redo logs..., Views,
suppose we have ten members of a physical file but we want the output of last 5 members only.how to achieve that?
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.
What is test execution and when will we start execution please send me one example for this question
i want to improve my english vocab for racking campus written exam plz tell me best book for prepration......
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".
what is best way to create a Thread class & why?
how do you generate source code for the automatic generation for receipt number
Write a pascal program to calculate the sum of the first 100 even number and odd number
how do i add a column dynamically in a table by using java application?
what is the software to run the GSM gate opener program