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 / batchu

#include<stdio.h>
#include<math.h>
#include<stdlib.h>
int main()
{
int hour,minute;
float angle;
printf("Enter the hour: ");
scanf("%d", &hour);
printf("Enter the minute: ");
scanf("%d", &minute);
if(hour>12)
{
hour = hour-12;
}
angle = hour * 30 + minute*0.5 - minute * 6;
if(angle>180)
{
angle = 360 - angle;
}
if (angle < 0 )
{
angle = angle * (-1);
}
printf("%f \n", angle);
return 0;
}

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is web configuration file

2006


how to study PHP my own? i reffered many sites.. but as being a fresher i couldnt follow those... which site will be the best one?

2225


1. Write a program to create a sentence at runtime and count number of vowels in it ? 2. Write a program to get a string and to convert the 1st letter of it to uppercase ?

3626


If i have a dataset queried from Sql and I would like to insert the dataset into a specific node in an xml document how do I do this

2073


please any one pass file aid,xpeditor and endeavor tools

2290


Can any one give an example (Source Code) on virtual function implemetation in Java?

1955


what is the similarity between networking devices?

2136


What is Negative testing?

2042


where is available in this mantis toturials?

2063


Hi Guys, This is Rama, right now I am working as a Software Test Engineer in Gurgoan and I have over all 3 years of testing expoeriance. Right now I am looking for a change. Can any body help me out to find a job in south india. Thanks in Advance

1836


they asked me about srs (software requirement specifcation)? how can i get anydocumentation about srs & other documnts infomation like bdd, in testing? its urgent?

1876


what is the certificates in biztalk?

1853


Hello Experts, What is the difference between move and move corresponding exactly? please post me asap

1771


a characteristic of a multiprogramming is? a.simultaneous exe of pgm instr 4m 2 appli b.concurrent processing of 2 r more prgms c.multiple cpu s d.all the abov

2132


how to convert hashmap to arraylist with iteration

1819