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
5.Call by value and Call by reference with program?
Tag for turning an image into a hyperlink is
Always use scope terminator like End-If with IF, End- Evaluate with Evaluate statement.Can somebody explain me the detail logical explanation?
how CLR identify vb file?
write algo for cobol program whichuse three flat file to extract some specific information 8 marks mainframe
Is anyone has done the ASP.NET MVC4 workshop course(2 days) from Peers Technologies. Let me know. I need to talk before joining ASP.NET MVC4 training at peers, Hyderabad.
How many forms can you create in a Visual Basic 6 Standard EXE project? Is there any limit on that?
When we use Windows authentication mode
what is the software to run the GSM gate opener program
In an customer exit (include Z) program, only the last record is getting fetched. The exit is getting called after pressing save button. What to write for fetching the first record ? Before saved to a SAP table how can i call all these records in an itab in the exit ?
what is c sharp dotnet
diffrence between oracle apps , .NET , SAP
how do i create my own exception class which will restrict IO exception?
Is the IT field raise again? What is the position of IT after 4 years?
How to print No.of.rows affected after updation using ADO.Net