Learn to Program C++ Tutorial: 3. Decisions
Preview
|
Buy lesson
Buy lesson
(only $0.99) |
You Might Also Like
-
Learn to Program C++ Tutorial: 2. variables -
Learn to Program C++ Tutorial: 1. The Compiler -
Learn PHP Tutorial: 7. Operators -
Learn PHP Tutorial: 8. Decisions -
Learn PHP Tutorial: 9. Loops -
Vista Lesson 16: Default Programs & Autoplay -
Vista Lesson 11: Working with the Control Panel -
A trainer gives the basics on Nutrition 101 -
Introduction to Animation in Premiere Elements -
MindBites Insight #3 (Editing for Windows)
-
MindBites Insight #3 (Editing for Windows) -
Introduction to Animation in Premiere Elements -
A trainer gives the basics on Nutrition 101 -
Vista Lesson 11: Working with the Control Panel -
Vista Lesson 16: Default Programs & Autoplay -
Learn PHP Tutorial: 9. Loops -
Learn PHP Tutorial: 8. Decisions -
Learn PHP Tutorial: 7. Operators -
Learn to Program C++ Tutorial: 1. The Compiler -
Learn to Program C++ Tutorial: 2. variables -
Learn to Program C++ Tutorial: 2. variables -
Learn to Program C++ Tutorial: 1. The Compiler
About this Lesson
- Type: Video Tutorial
- Length: 12:08
- Media: Video/mp4
- Posted: 07/14/2009
- Use: Watch Online & Download
- Download: MP4 (iPod compatible)
- Size: 20 MB
This lesson is part of the series: Intro to Programming in C++
Programs can make choices. In this lesson you'll learn how to code your program to make decisions. Learn how to use Relational Operators to make statements reduce to being either true or false. Learn how to use if statements to control what lines of code your program runs depending on the value of variables or statements.
If you don't already have a C++ compiler you'll need to watch the 1st video to get and setup a C++ compiler.
Click Here to view the compiler video:
http://www.mindbites.com/lessons/edit/4658-learn-c-tutorial-1-the-compiler
About this Author
-
- Tomorrow Soft
- 3 lessons
- Joined:
07/06/2009
Tomorrow Soft is a premier developer of video tutorials teaching everyday men and women the skills they need to start creating their own programs from scratch.
More..Recent Reviews
This lesson has not been reviewed.
Please purchase the lesson to review.
Recent Comments
This lesson has not been reviewed.
Please purchase the lesson to review.
The List Of Relational Operands:
a > b Greater than
a < b Less than
a >= b Greater than or equal to
a <= b Less than or equal to
a == b Equal to
a != b Not equal to
Here's a Copy of The last program created in this lesson:
#include <iostream>
using namespace std;
int main()
{
// variables
int pounds;
int cost = 4;
// Ice Cream Store
cout << "**************************" << endl;
cout << " Ice Cream Store " << endl;
cout << "**************************" << endl;
cout << endl;
cout << "I'm selling ice cream." << endl;
// Get Pounds from User
cout << "How many pounds do you" << endl;
cout << "want? ";
cin >> pounds;
// print out a response
if( pounds < 4 )
cout << "that's not very much." << endl;
if( pounds >= 12 )
cout << "you'll get sick!" << endl;
cout << "that'll cost you " << endl;
cout << (pounds * cost) << "$" << endl;
return 0;
}
Buy Now and Start Learning
CommunityMore
Embed this video on your site
Copy and paste the following snippet:
Link to this page
Copy and paste the following snippet:

