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
Given an array of size n, containing every element from 1 to n+1, except one. Find the missing element.
I am looking for NIC Sample papers or any patern of questions/ syllabus plz, send me on hamid.khan135@yahoo.in Regard
What's the difference b/w Table & Templete in Smartform?
what is the diff bw sql direct and jdbc update can't we do select and updating operation in sql direct
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 delegate and delegation model give the real live example on delegate model
I want Ada programming language books. Could anyone post me any link for that?
What is the purpose of
Need guidewire related Documents(Interview Question/Tips/Best Practice/Dumps)
what is meaning of MDM in sap?let me know that meaning
can we use commit,rollback in triggers and how?
what is technical system, business system, logical system in sap pi7.0
Always use scope terminator like End-If with IF, End- Evaluate with Evaluate statement.Can somebody explain me the detail logical explanation?
how to fin top two miximum values in sql? not 2nd both max value of 1st and 2nd both have to find out
Write a program to swap the content of two variables without using a third variable.