diff options
author | Oskar <[email protected]> | 2024-08-18 21:02:35 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-08-18 21:02:35 +0200 |
commit | 19903ae3536255dfa2778846275267605cee9f7e (patch) | |
tree | 94f9ecb62c1d02b5c00f4fc9c760ec4ed4a10105 /4p13.cpp | |
parent | 3d0a78eaaafff660cd04adf23a6bec1721187abf (diff) |
more exercises, one unfinished
Diffstat (limited to '4p13.cpp')
-rw-r--r-- | 4p13.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/4p13.cpp b/4p13.cpp new file mode 100644 index 0000000..b5cfdf1 --- /dev/null +++ b/4p13.cpp @@ -0,0 +1,23 @@ +#include <iostream> + +/* + * + * 4.13 + * + * + */ + +int main () { + + + int i1; + int i2; + double d1; + double d2; + double threepointfive = 3.5; // made a variable for 3.5 to avoid compiler errors + d1 = i1 = threepointfive; // i == 3, d == 3 + i2 = d2 = threepointfive; // d == 3.5, i == 3 + std::cout << d1 << " <-d1(3) (3)i1-> " << i1 << std::endl; + std::cout << d2 << " <-d2(3.5) (3)i2-> " << i2 << std::endl; + return 0; +} |