| Lesson Part IV (C++); Lession 4 (if statment) | |
|---|---|
| Tweet Topic Started: Aug 25 2006, 04:54 PM (518 Views) | |
| fsd | Aug 25 2006, 04:54 PM Post #1 |
|
3a4
![]()
|
int x = 3; ----------define your variables int y = 4; cout << "what does x equal" << endl; cin >> x ; --------------------------------------------get the values cout << "what does y equal" << endl; cin >> y ; if (x > y) - you start with your if statment then inside the () you put the condition and then we do {} in this you put what to do if (condition) else - the else statment this you can put after a if stament just in case the condition if false |
|
"mmmmm i love the internet. every time i go to a website i get a cookie HOW AWESOME IS THAT!" - Quote from me "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - Albert Einstein "Imagination is more important than knowledge."- Albert Einstein | |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Tutorials · Next Topic » |







3:20 AM Jul 11