aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author[email protected] <[email protected]>2021-10-12 21:16:43 -0700
committer[email protected] <[email protected]>2021-10-12 21:16:43 -0700
commit4204efc56ecac63f5007c79f920a5bdb856b8255 (patch)
tree8aad9ae5eb3dfea5c373b6ffa3ce6ebacafa340a
parentLab2 Assignment (diff)
downloadcst116-lab2-rayyanansari03-4204efc56ecac63f5007c79f920a5bdb856b8255.tar.xz
cst116-lab2-rayyanansari03-4204efc56ecac63f5007c79f920a5bdb856b8255.zip
REUPDATED LAB2 H.W
-rw-r--r--Lab2Ansari/Lab2answeres-Ansari.txt62
1 files changed, 62 insertions, 0 deletions
diff --git a/Lab2Ansari/Lab2answeres-Ansari.txt b/Lab2Ansari/Lab2answeres-Ansari.txt
index 13f35d9..bf5db14 100644
--- a/Lab2Ansari/Lab2answeres-Ansari.txt
+++ b/Lab2Ansari/Lab2answeres-Ansari.txt
@@ -62,6 +62,68 @@ Class_score + Assignmnet_avg*.30 + Final*.25 + Test_avg*.45
Display "Final Score:"
Display Class_score
+---------------------------------------------------------------------------------
+EXERCISES 3c
+pages 83-84 #2-3
+
+2)
+
+PROGRAM:
+
+#include <iostream>
+#include <iomanip>
+using namespace std;
+using std::ios;
+
+int main()
+{
+ char ascii = 67;
+ cout << ascii << '\n';
+ ascii = 43;
+ cout << ascii << '\n';
+ cout << ascii << '\n';
+ //return 0;
+
+}
+
+OUTPUT:
+
+C
++
++
+
+C:\Users\ansar\source\repos\OIT Brushup\Debug\OIT Brushup.exe (process 21044) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+3)
+
+PROGRAM:
+
+#include <iostream>
+#include <iomanip>
+using namespace std;
+using std::ios;
+
+int main()
+{
+ int age = 18;
+
+ int daysInYears = 365;
+
+ cout << age * daysInYears;
+
+}
+
+OUTPUT:
+
+6570
+C:\Users\ansar\source\repos\OIT Brushup\Debug\OIT Brushup.exe (process 12788) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+
+
===============================================================================
EXERCISE 4a