/
exercise5.cpp
36 lines (27 loc) · 1.01 KB
/
exercise5.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// -----------------------------------------------------------------------------
// https://lptcp.blogspot.com/
//
/*
Chapter 4 - Exercise 5
(*1.5) Write a program that reads a name (a string) and an age (an int) from
the standard input stream cin. Then output a message including the name and
age to the standard output stream cout.
*/
// https://github.com/l-paz91/
// -----------------------------------------------------------------------------
//--INCLUDES--//
#include "std_lib_facilities.h"
// -----------------------------------------------------------------------------
int main()
{
string name;
int age;
cout << "Please enter your name and age: ";
cin >> name >> age;
cout << "Hello, " << name << " (age " << age << ")\n";
keep_window_open();
return 0;
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------