Advertisement
ChaosTheosis

While Loop

Jan 25th, 2015
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7.  
  8. //The while loop depends on the operator you use, for example, (titan >= 0) checks for if titan is higher
  9. //or the same, if its higher and or the same it becomes true and executes the commands in the curly brackets.
  10.  
  11. namespace Tutorial_Project_1.Tutorial_1_Examples
  12. {
  13.     class While_Loop
  14.     {
  15.         static void Main()
  16.         {
  17.             int titan = 20;
  18.             while (titan >= 0)
  19.             {
  20.                 Console.WriteLine("Titan = " + titan);
  21.                 titan--;
  22.             }
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement