Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner s = new Scanner(System.in);
- int hour;
- int time;
- //ask from the user what you want
- System.out.println("please enter hour: ");
- hour=s.nextInt();
- //calc the hour
- time=(hour+10)%24;
- //
- System.out.println("the hour is: "+time);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement