aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lawrance <[email protected]>2021-10-06 20:24:35 -0700
committerJames Lawrance <[email protected]>2021-10-06 20:24:35 -0700
commit0e38f772032a04ebc46790a62dcf1a1fab275fdb (patch)
tree3968f64d293110356baeeda452b4e2d48a02f8dd
parentTextbook pg. 72 section 4.3 #1 problem completed (diff)
downloadcst116-lab2-jemersonlawrance-0e38f772032a04ebc46790a62dcf1a1fab275fdb.tar.xz
cst116-lab2-jemersonlawrance-0e38f772032a04ebc46790a62dcf1a1fab275fdb.zip
Textbook pg. 72 section 4.3 #1 problem
In-class example
-rw-r--r--CST116 Lab 2 Homework.txt0
-rw-r--r--CST116F2021-Lab2/CST116F2021-Lab2.cpp14
2 files changed, 8 insertions, 6 deletions
diff --git a/CST116 Lab 2 Homework.txt b/CST116 Lab 2 Homework.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/CST116 Lab 2 Homework.txt
diff --git a/CST116F2021-Lab2/CST116F2021-Lab2.cpp b/CST116F2021-Lab2/CST116F2021-Lab2.cpp
index 2c7db61..9292e27 100644
--- a/CST116F2021-Lab2/CST116F2021-Lab2.cpp
+++ b/CST116F2021-Lab2/CST116F2021-Lab2.cpp
@@ -2,12 +2,14 @@
//
#include <iostream>
+using namespace std;
int main()
{
- short age = 19;
- float shoe size = 8.5;
- short altitude = 0;
- char gender = F;
- short weight = 175;
-} \ No newline at end of file
+ int x;
+ cin >> x;
+ if (x == 5)
+ {
+ cout << x;
+ }
+}