From 4204efc56ecac63f5007c79f920a5bdb856b8255 Mon Sep 17 00:00:00 2001 From: "ansari.rayyan@outlook.com" Date: Tue, 12 Oct 2021 21:16:43 -0700 Subject: REUPDATED LAB2 H.W --- Lab2Ansari/Lab2answeres-Ansari.txt | 62 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) 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 +#include +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 +#include +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 -- cgit v1.2.3