mjc65

Example 1-56. Using multiple if/else statements

Jun 23rd, 2020
499
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.19 KB | None | 0 0
  1. bool b = false;
  2. bool c = true;
  3.  
  4. if (b)
  5. {
  6.     Console.WriteLine("b is true");
  7. }
  8. else if (c)
  9. {
  10.     Console.WriteLine("c is true");
  11. }
  12. else
  13. {
  14.     Console.WriteLine("b and c are false");
  15. }
Advertisement
Add Comment
Please, Sign In to add comment