cplusplus:selection_examples
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cplusplus:selection_examples [2013/02/11 00:55] – [comparing characters] mithat | cplusplus:selection_examples [2013/02/11 01:00] (current) – [switch] mithat | ||
---|---|---|---|
Line 138: | Line 138: | ||
int selection; | int selection; | ||
+ | // Prompt the user for a selection: | ||
cout << " | cout << " | ||
<< | << | ||
Line 145: | Line 146: | ||
cin >> selection; | cin >> selection; | ||
+ | // Give the user what they asked for: | ||
switch (selection) | switch (selection) | ||
{ | { | ||
Line 162: | Line 164: | ||
cout << "You did not enter 1, 2, or 3." << endl; | cout << "You did not enter 1, 2, or 3." << endl; | ||
} | } | ||
+ | |||
return 0; | return 0; | ||
}</ | }</ | ||
cplusplus/selection_examples.1360544149.txt.gz · Last modified: 2013/02/11 00:55 by mithat