summaryrefslogtreecommitdiff
path: root/5p18.cpp
blob: eb6ea7f3145b5481f38073076dff612679192128 (plain)
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

/*
 *
 * 5.18
 *
 *
 */

int main () {

	/*
	  (a) Corrected versions

	  do {
	  int v1, v2;
	  cout << "Please enter two numbers to sum:" ;
	  if (cin >> v1 >> v2)
	  cout << "Sum is: " << v1 + v2 << endl;
	  } while (cin);

	  (b)
	  int ival;
	  do {
	  // . . .
	  } while (ival = get_response());

	  (c)
	  int ival;
	  do {
	  ival = get_response();
	  } while (ival);
	  
	 */
	return 0;
}