Advertisement
Guest User

AdvancedAstrixClock

a guest
Jul 29th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace C15_Ex01_3
  6. {
  7.     class AdvancedAstrixClock
  8.     {
  9.         public static void RunAdvancedAstrixClock()
  10.         {//!!!(1) -  maybe implement input as a separate method ?
  11.             int heightOfClock = 0;
  12.             while(heightOfClock == 0)
  13.             {
  14.                 string stringHeightFromInput = System.Console.ReadLine();
  15.                 bool goodInput = int.TryParse(stringHeightFromInput, out heightOfClock);
  16.                 if(!goodInput || heightOfClock < 0)
  17.                 {
  18.                     heightOfClock = 0;
  19.                 }
  20.             }
  21.  
  22.  
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement