Advertisement
Guest User

Untitled

a guest
Sep 1st, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.96 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication192_16_
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             int hours = 0;
  13.             int minutes = 0;
  14.             int seconds = 0;
  15.             while (hours<=24)
  16.             {
  17.                 if (hours == 24)
  18.                     hours = 0;
  19.                 while (minutes<60)
  20.                 {
  21.                     if (minutes == 60)
  22.                     {
  23.                         hours++;
  24.                         minutes = 0;
  25.                     }
  26.                     while (seconds < 60)
  27.                     {
  28.                         seconds++;
  29.                         if (seconds == 60)
  30.                         {
  31.                             minutes++;
  32.                             seconds = 0;
  33.                         }
  34.                     }
  35.                 }
  36.             }
  37.         }
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement