MeehoweCK

Untitled

Oct 15th, 2020
1,918
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. /* Conditional statement IF
  6.  
  7. if(condition)
  8.     instruction if the condition is satisfied
  9.  
  10. */
  11.  
  12. int main()
  13. {
  14.     if(4 > 2)
  15.         cout << "4 is more than 2, so this text is visible.\n";
  16.     if(5 > 10)
  17.         cout << "We won't see this text in the console.\n";
  18.     else
  19.         cout << "The last condition (5 > 10) is false, so this text is visible.\n";
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment