diff options
author | Oskar <[email protected]> | 2024-08-30 19:48:45 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-08-30 19:48:45 +0200 |
commit | 1e4270a7110858d6f5d4cdf12f37d78dc81bc7d9 (patch) | |
tree | afe16482c283942c2546f8e454a59f8ede01b852 /5p18.cpp | |
parent | 8f54ef4d7e1c112e6dde2947a6a9a27c8393f899 (diff) |
more
Diffstat (limited to '5p18.cpp')
-rw-r--r-- | 5p18.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/5p18.cpp b/5p18.cpp new file mode 100644 index 0000000..eb6ea7f --- /dev/null +++ b/5p18.cpp @@ -0,0 +1,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; +} |