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
What is the difference between CLEAR & RESET and OPEN & CLOSE OPCOEDS(USING RPG/400).wheare we can use this?can any body tell me in real time senario with example please?
write a sql qwery which include joining of two tables 4 marks mainframe
what is difference between object oriented programming structure and object oriented programming system?
what is the BAM? where we can use it in BizTalk server?
how to remove header and footer in jcl using sort utility
what is the purpose of checked Menu options
what is technical system, business system, logical system in sap pi7.0
WHAT IS THE MEANING OF CONSTANT ...EXEEDS LENGTH LIMIT WHILE COPYING FROM PS FILE TO KSDS
Hi all... I had completed MSC(Computer) and had join the construction company based on sap.they want me to work on abap.but software company is totally different from construction company and they want me 2 grasp it as fast i can.i am finding it difficult.what should i do??????
WS-NUM PIC S9(05)V(02) SIGN TRAILING SEPARATE MOVE '0050000+' TO WS-NUM The value stored is 00500,00+ MOVE '0050000-' TO WS-NUM Then what is the value will be stored in WS-NUM? Am getting '-00500,00'.....>>> What should I declare to WS-NUM so that I can get correct values for both + & - signs.
Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 1 number. Find the missing number
how much fee for deccan soft institute .how to block seat for sandeep sir class reply soonnnnÂ
How many forms can you create in a Visual Basic 6 Standard EXE project? Is there any limit on that?
what is the software to run the GSM gate opener program
what is the current salary package in India for a lamp programmer