Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //10. Часовник - част 2
- public class MyClass {
- public static void main(String args[]) {
- int maxMinuteAndSeconds = 59;
- int maxHour = 23;
- int currentHour = 0;
- while (currentHour <= maxHour) {
- for (int i = 0; i <= maxMinuteAndSeconds; i++) {
- for (int j = 0; j <= maxMinuteAndSeconds; j++) {
- System.out.printf("%d : %d : %d\n",currentHour,i,j); //needed softuni solution
- /* System.out.printf("%02d : %02d : %02d\n",currentHour,i,j); //proper solution */
- }
- }
- currentHour++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement