Write a Pseudo Code to find the angle between two hands of a
clock for a given time.
Answer Posted / batchu
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
int main()
{
int hour,minute;
float angle;
printf("Enter the hour: ");
scanf("%d", &hour);
printf("Enter the minute: ");
scanf("%d", &minute);
if(hour>12)
{
hour = hour-12;
}
angle = hour * 30 + minute*0.5 - minute * 6;
if(angle>180)
{
angle = 360 - angle;
}
if (angle < 0 )
{
angle = angle * (-1);
}
printf("%f \n", angle);
return 0;
}
Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
can any method return type may be constructor , or that method name allow
what is the current salary package in India for a lamp programmer
9.Difference between even and odd signals?explain with the diagram?
what are resources in case of Threads
Hi guyes, I have cleared 2 technical rounds with cts for liferay and java techonologies, i have client round next week, please tell me how to prepare for this what questions i should be ready to face?
Delta 5 weight scale not connect with oracle application what i can do?
i am exeprienced person what is selection process
Given a Binary Search Tree, write a program to print the kth smallest element without using any static/global variable. You can?t pass the value k to any function also.
what is the use of occurs 10 or (any number) in the internal table declaration with header line.
hoe to data grid use in sql server 2000?
Write a shell program to test whether a given year is leap year or not ?
How to call a C++ function which is compiled with C++ compiler in C code?
In mainframe SDSF, Can we copy the list of jobs currently executing in SDSF in to a seperate DATASET...?
What is test execution and when will we start execution please send me one example for this question
How to connect to ms word wit VB ojective is to prepare s/w to generate question paper , selects questions randomly from the ms access , database