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
design a counter with the following repeated binary sequence: 0, 1, 2, 3, 4, 5, 6, 7, 8 using JK Flip Flop.
what are importance in problem tracking
how will you code the subfile which is in editing mode (multiple case subfile)?
Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fit" instead of the number and for the multiples of five print "Bit". For numbers which are multiples of both three and five print "FitBit".
Is class is a abstract datatype in java?
What is the purpose of
suppose we have ten members of a physical file but we want the output of last 5 members only.how to achieve that?
Write a program to create a process in UNIX
What is BASIS
what are all the validation we need to perform in data stage?
what is apt_dump_score in datastage where it is useful
what are the 3 forms of a prolog term
what are other resources are needed for this mantis?
I am work in it aompenei
Can i please VHDL code for D-Latch with clear input ?? (HINT: Set up a “Process” with appropriate sensitivity list to get the desired D-Latch with Clr working.) Inputs and Outputs: entity Lab4b is Port ( Clr, Clk, D : in STD_LOGIC; Q : out STD_LOGIC); end Lab4b;