diff options
| author | WiserJ <[email protected]> | 2021-10-19 15:09:03 -0700 |
|---|---|---|
| committer | WiserJ <[email protected]> | 2021-10-19 15:09:03 -0700 |
| commit | 197e5e8bbbc309222bdcf016003a5eed139091dc (patch) | |
| tree | 03fce6bd54b4a3d5586916163f9e3f1ae8d68155 | |
| parent | p.177 (diff) | |
| download | cst116-lab3-jeffwoit-197e5e8bbbc309222bdcf016003a5eed139091dc.tar.xz cst116-lab3-jeffwoit-197e5e8bbbc309222bdcf016003a5eed139091dc.zip | |
p.179
| -rw-r--r-- | CST116F2021-Lab3/CST116F2021-Lab3.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/CST116F2021-Lab3/CST116F2021-Lab3.cpp b/CST116F2021-Lab3/CST116F2021-Lab3.cpp index df75723..95c277c 100644 --- a/CST116F2021-Lab3/CST116F2021-Lab3.cpp +++ b/CST116F2021-Lab3/CST116F2021-Lab3.cpp @@ -27,13 +27,11 @@ int main() remainder = input % 2; } - while (input != 0) + do { cout << input << ' '; input = input - 2; - } - - cout << "0."; + } while (input != 0); return 0; |