Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / samer el-haj-mahmoud

#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 / 2 - minute * 6;

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

return 0;
}

Is This Answer Correct ?    6 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

it is a language or tools?

2154


Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming

12059


what is the work of 1tier,2tier,&ntier? Plz Explain it!

2523


Is there any standard procedure to test the application as a whole? Or How can I test complete application right from the requirement gathering?

1999


what is delegate and delegation model give the real live example on delegate model

3329


what are the advantages of sap on other software ?

2215


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

1969


what are the things i had to say in personal introduction in hr round mail me to prasanna.1867@rediff.com

2176


what are the topics choosen for jam round for interviews

1714


Find out the list of roles which gives access to GUI activities? thanks in advance

2198


What is the Difference between in memory database and physical database

2674


what is the difference between rename and label

2438


hii I inntrested abt scjp certification but i dont knw abt scjp plz send details abt scjp exam and syllabus.

1916


give idea for creating screen in abap

2197


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?

2102