summaryrefslogtreecommitdiff
path: root/4p13.cpp
diff options
context:
space:
mode:
Diffstat (limited to '4p13.cpp')
-rw-r--r--4p13.cpp23
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;
+}