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
what is web configuration file
how to study PHP my own? i reffered many sites.. but as being a fresher i couldnt follow those... which site will be the best one?
1. Write a program to create a sentence at runtime and count number of vowels in it ? 2. Write a program to get a string and to convert the 1st letter of it to uppercase ?
If i have a dataset queried from Sql and I would like to insert the dataset into a specific node in an xml document how do I do this
please any one pass file aid,xpeditor and endeavor tools
Can any one give an example (Source Code) on virtual function implemetation in Java?
what is the similarity between networking devices?
What is Negative testing?
where is available in this mantis toturials?
Hi Guys, This is Rama, right now I am working as a Software Test Engineer in Gurgoan and I have over all 3 years of testing expoeriance. Right now I am looking for a change. Can any body help me out to find a job in south india. Thanks in Advance
they asked me about srs (software requirement specifcation)? how can i get anydocumentation about srs & other documnts infomation like bdd, in testing? its urgent?
what is the certificates in biztalk?
Hello Experts, What is the difference between move and move corresponding exactly? please post me asap
a characteristic of a multiprogramming is? a.simultaneous exe of pgm instr 4m 2 appli b.concurrent processing of 2 r more prgms c.multiple cpu s d.all the abov
how to convert hashmap to arraylist with iteration