This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
cs-142:more-data-types-work [2016/09/06 16:25] kseppi |
cs-142:more-data-types-work [2016/09/10 15:22] kseppi |
||
---|---|---|---|
Line 1: | Line 1: | ||
<code cpp> | <code cpp> | ||
#include<iostream> | #include<iostream> | ||
- | #include<iomanip> | ||
#include<string> | #include<string> | ||
Line 7: | Line 6: | ||
int main() { | int main() { | ||
+ | |||
+ | /* Try this for input: | ||
+ | 42 | ||
+ | Kevin | ||
+ | Kevin D Seppi | ||
+ | Kevin | ||
+ | Kevin | ||
+ | */ | ||
+ | |||
cout << "strings:" << endl; | cout << "strings:" << endl; | ||
Line 26: | Line 33: | ||
cout << "The middle 6 characters are \"" << middlePart << "\"" << endl; | cout << "The middle 6 characters are \"" << middlePart << "\"" << endl; | ||
cout << endl; | cout << endl; | ||
- | + | ||
cout << "CIN:" << endl; | cout << "CIN:" << endl; | ||
Line 56: | Line 63: | ||
cout << endl; | cout << endl; | ||
- | cout << "Full name: " << fullName << "That is better." << endl; | + | cout << "Full name: " << fullName << " What?" << endl; |
// back to numbers | // back to numbers |