Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- /* Conditional statement IF
- if(condition)
- instruction if the condition is satisfied
- */
- int main()
- {
- if(4 > 2)
- cout << "4 is more than 2, so this text is visible.\n";
- if(5 > 10)
- cout << "We won't see this text in the console.\n";
- else
- cout << "The last condition (5 > 10) is false, so this text is visible.\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment