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 37 38 39 40 41 42 43 44 45
|
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string a, b, c, d, e, f, g, h, i, j, e1,e2,e3,e4,e5,e6,e7,e8,e9,e10;
if (a != "Stop") {
cout << "Please enter name for employee 1 (or “Stop”): ";
cin >> a;
cout << "Please enter name for employee 2 (or “Stop”): ";
cin >> b;
if (b == "Stop") {
cout << endl;
cout << "Please enter name for employee 3 (or “Stop”): ";
cin >> c;
if (c == "Stop") {
cout << endl;
cout << "Please enter email for employee 1:";
cin >> e1;
if (e1 == "Stop") {
cout << endl;
cout << '\n';
cout << "Please enter email for employee 2:";
cin >> e2;
if (e2 == "Stop") {
cout << endl;
cout << "Please enter email for employee 3:";
cin >> e3;
if (e3 == "Stop") {
cout << endl;
}
}
}}}
cout << "Which employee’s email would you like? ";
cin >> e1;
cout << "The email address of " << a << "is:" << e2;
}
}
| |