Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Tutorial_Project_1.Tutorial_1_Examples
- {
- class IF_Statement
- {
- static void Main()
- {
- int titan = 10;
- int abnormal = 20;
- if (titan < abnormal)
- {
- Console.WriteLine("Titan is less than abnormal");
- }
- else if (titan > abnormal)
- {
- Console.WriteLine("Titan is greater than abnormal");
- }
- else
- {
- Console.WriteLine("titan is equal to abnormal");
- }
- //The statement, "if" is used to determine when things are true or false and or when to do something.
- //For example if (titan > abnormal) = if titan is more than abnormal.
- //Join them using "else", with else it wont even need to check for the other to be present
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement