Question: Lab 3 Simple C++ Program CSCI 111 Programming and Algorithms I Due Sunday January 31, 11:59pm on turnin 10 Points STEP 1: simple C++ Program
Lab 3
Simple C++ Program
CSCI 111 Programming and Algorithms I
Due Sunday January 31, 11:59pm on turnin
10 Points
STEP 1: simple C++ Program
Here is a copy of the code similar to what we discussed in class.
#include
using namespace std;
int main()
{
int x;
int y;
int z;
x = 34;
y = 9;
z = x + y;
cout << "The sum of " << x << " and " << y << " is " << z << endl;
return 0;
}
Compile the source code:
g++ -std=c++11 -o lab3 lab3.cpp
Execute the object code:
./lab3
Task list:
1. Start by creating a source code file named lap3.cpp with the above code as done in class.
2. Compile and execute the code.
3. Edit the code to perform the multiplication between 34 and 9 (instead of a sum).
4. Edit the cout statement be replacing the word sum with product.
5. Confirm that your changes are correct.
6. If you are working on this lab remotely, then transfer the lab3.cpp code from jaguar to your laptop.
7. Submit your lab3.cpp file on https://turnin.ecst.csuchico.edu/
8. Ensure that you get a successful message after submitting work via turnin.
GRADING
To achieve a maximum score, students will need to clearly prove that they completed the goal.
Points lost for incompleteness, sloppiness, lateness, or failure to follow instructions.
Refer to syllabus for late policy
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
