Write a program to input time in hours , minutes and second and print it on second
Answers
Answered by
0
010101010110101010100
Answered by
3
Answer:
JAVA:-
Explanation:
import java.util.*;
class Brainly
{
static void main()
{
Scanner sc=new Scanner(System.in);
int h,m,s,sec;
System.out.println( “Enter time in hours:”);
h=sc.nextInt();
System.out.println( “Enter time in minutes:”);
m=sc.nextInt();
System.out.println( “Enter time in seconds:”);
s=sc.nextInt();
sec=h*3600+m*60+s;
System.out.println( “Time in seconds:”+sec);
}
}
Similar questions