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

how to add Servlet-api.jar file into eclipse 3.3.2 ?

4530


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?

2056


Which design patterns have you used?

1956


Which CRM is better to opt, Sebiel CRM or Salesforce CRM or sap CRM? which institute is best one in hyderabad

2259


iam confused among testing ,.net and java. can anybody help me.

1968


What is test execution and when will we start execution please send me one example for this question

1830


Compare any 4 software development life cycle paradigms with each other. Indicate at least one application for each of the paradigms that are suitable to developed using that paradigm.

2782


THE CHANNEL IN DATA COMMUNICATION CAN BE?

1991


how to data grid use in data bind?

1966


Hai, My name is nisha.I have NIC exam.If anybody Knows NIC previous paper pattern pls send me to nishanairp@gmail.com

2141


what is the purpose of checked Menu options

2411


how many types of bytes are there???

2509


in IT trend mantis meant what? how to know mantis in IT trends? detail description about mantis?

2129


5.Call by value and Call by reference with program?

2242


what are importance in problem tracking

2061