Write a Pseudo Code to find the angle between two hands of a
clock for a given time.

Answer Posted / 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
{
(int)angle = hour * 30 - minute * 6;

if(angle > 180)
angle = 360 - angle;
printf("%d\n", angle);
}
else
printf("bye\n");

return 0;
}

Is This Answer Correct ?    2 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

in network security,how we identified threat?some one say we found threat according to it's signature,but how we get signature or pattern of the virus?

1506


how to fin top two miximum values in sql? not 2nd both max value of 1st and 2nd both have to find out

1484


SAS question: I have 50 fils a1,a2,...,a50. the primary key is upc. then if i want to merge all 50 files, the code is as follows, data test; merge a1 ... a50; by upc; run; we know that writing all 50 files name is time consuming, is there any standard format of this code?

1505


What is web.configuration? how is it work? & wht is use this?

1350


When you deliver your C++ headers and C++ library of a class (what all can you change in the class so that application using your class does not need to recompile the code)

718






3 members in a pf.how we read 3 members without using ovrdbf.using rg pgms....

1663


smal talk is pure object oriented or not?

1520


How does the type system works when there is interoperability between a COM and .Net, i mean what exactly happens there

1562


What is the meaning of client-server application. The purpose of Client-Server Application. with description.

1643


in IBM PC -AT.WAT AT REFERS TO?

1414


how do u handle table control inbdc explain the process in steps iwant the answer in urgent please forward this even i know how to explain there

1742


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?

1565


what do u mean by tagging

1609


Colors specified with the notation

1799


Define distributed queries. can you explain me as soon as possible

1618