-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnewproverb.cpp
43 lines (36 loc) · 1.02 KB
/
newproverb.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
37
38
39
40
41
42
43
// Syeda Umm E Abiha Rizvi
// SE-21014
#include <iostream>
#include <string>
using namespace std;
void writeProverb(int);
int main()
{
int wordCode;
cout << "Given the phrase:" << endl;
cout << "Now is the time for all good men to come to the aid of their ___" << endl;
cout << "Input a 1 if you want the sentence to be finished with party" << endl;
cout << "Input any other number for the word country" << endl;
cout << "Please input your choice now" << endl;
cin >> wordCode;
cout << endl;
writeProverb(wordCode);
return 0;
}
void writeProverb(int number)
{
if (number == 1)
{
cout << "For all good men to come to the aid of their party" << endl;
}
else if (number==2)
{
cout << "For all good men to come to the aid of their country" << endl;
}
else
{
cout << "I'm sorry but that is an incorrect choice; Please input a 1 or 2" << endl;
cin >> number;
writeProverb(number);
}
}