Advertisement
ChaosTheosis

"if" Statement

Jan 25th, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 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. namespace Tutorial_Project_1.Tutorial_1_Examples
  8. {
  9.     class IF_Statement
  10.     {
  11.         static void Main()
  12.     {
  13.             int titan = 10;
  14.             int abnormal = 20;
  15.  
  16.     if (titan < abnormal)
  17.     {
  18.     Console.WriteLine("Titan is less than abnormal");
  19.    
  20.     }
  21.     else if (titan > abnormal)
  22.     {
  23.         Console.WriteLine("Titan is greater than abnormal");
  24.     }
  25.     else
  26.     {
  27.         Console.WriteLine("titan is equal to abnormal");
  28.     }
  29.  
  30.    //The statement, "if" is used to determine when things are true or false and or when to do something.
  31.    //For example if (titan > abnormal) = if titan is more than abnormal.
  32.    //Join them using "else", with else it wont even need to check for the other to be present
  33.  
  34.  
  35.             }
  36.         }
  37.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement