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


Please Help Members By Posting Answers For Below Questions

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?

1578


write a sql qwery which include joining of two tables 4 marks mainframe

1502


what is difference between object oriented programming structure and object oriented programming system?

1458


what is the BAM? where we can use it in BizTalk server?

1361


how to remove header and footer in jcl using sort utility

5117






what is the purpose of checked Menu options

1992


what is technical system, business system, logical system in sap pi7.0

2138


WHAT IS THE MEANING OF CONSTANT ...EXEEDS LENGTH LIMIT WHILE COPYING FROM PS FILE TO KSDS

1534


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??????

1413


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.

1861


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

733


how much fee for deccan soft institute .how to block seat for sandeep sir class reply soonnnn 

1668


How many forms can you create in a Visual Basic 6 Standard EXE project? Is there any limit on that?

1548


what is the software to run the GSM gate opener program

1676


what is the current salary package in India for a lamp programmer

1882