[404218]: / Code / C++ / C++ Tutorial Source Files / 02_C++_NameAge.cpp

Download this file

17 lines (13 with data), 425 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#include <iostream>
using namespace std;
int main()
{
string characterName = "Tom";
int characterAge;
characterAge = 50;
cout << "There once was a man named " << characterName << std::endl;
cout << "He was " << characterAge << " years old" << std::endl;
cout << "He liked the name " << characterName << std::endl;
cout << "But did not like being " << characterAge << std::endl;
return 0;
}