Page 1 of 1

Exercise 1 What does the program do? what is the output? *Don't use the compiler!! #include using namespace s

Posted: Fri Jul 01, 2022 5:33 am
by answerhappygod
Exercise 1 What Does The Program Do What Is The Output Don T Use The Compiler Include Iostream Using Namespace S 1
Exercise 1 What Does The Program Do What Is The Output Don T Use The Compiler Include Iostream Using Namespace S 1 (59.27 KiB) Viewed 37 times
Exercise 1 What Does The Program Do What Is The Output Don T Use The Compiler Include Iostream Using Namespace S 2
Exercise 1 What Does The Program Do What Is The Output Don T Use The Compiler Include Iostream Using Namespace S 2 (55.66 KiB) Viewed 37 times
Exercise 1 What Does The Program Do What Is The Output Don T Use The Compiler Include Iostream Using Namespace S 3
Exercise 1 What Does The Program Do What Is The Output Don T Use The Compiler Include Iostream Using Namespace S 3 (66.83 KiB) Viewed 37 times
Exercise 1 What does the program do? what is the output? *Don't use the compiler!! #include <iostream> using namespace std; int main() { ant sum; // int x; // x = 1; // sum = 0; // while x <= 10 ) // { sum += x; // ++x; // } // Sou << "The sum is: } // The program colculator the = くく sum << endl;
Exercise 2 What does the program do? what is the output? *Don't use the compiler!! #include <iostream> using namespace std; int main() { int y; // int x = 1; // int total = 0; // while. x <= 10 ) // { y = x * x; // cout << y << endl; // total += y; // x++; // } // Sout << "Total is } // << total << endl; //
Exercise 3 What does the program do? what is the output? *Don't use the compiler!! #include <iostream> using namespace std; int main() { int x = 5; int product = 5; int quotient = 5; // part a product = x++; // part a statement sout << "Value of product after calculation: "<< product << endl; sout << "Value of x after calculation: " << x << endl << endl; // part b x = 5; // reset value of x quotient /= ++x; // part b statement cout << "Value of quotient after calculation: " << quotient << endl; sout << "Value of x after calculation: " << x << endl << endl; } // end main