InterviewSolution
Saved Bookmarks
| 1. |
Program to display time in hours,and convert time into minutes as well as seconds |
|
Answer» IMPORT java.util.*; class TIME { public static void MAIN(String args[]) { Scanner sc=new Scanner(System.in); Sopln("Input seconds"); int SEC= sc.nextInt(); int hours=sec/3600; sec=sec(PERCENTAGE SIGN)3600; int min=sec/60; Sopln("Hours:"+hours); Sopln("MINUTES"+min); Sopln("Second"+seconds); } } |
|