Question: Type in the program given below as is. Make sure you have no typos. Compile and run the program. Remove in the line int side;
-
Type in the program given below as is. Make sure you have no typos.
-
Compile and run the program.
-
Remove in the line int side; Compile the program and look at the error message.
-
Correct the errors. Compile and run the program.
-
Remove side in the line int side; Compile the program and look at the error message.
-
Correct the errors. Compile and run the program.
-
Remove int in the line int side; Compile the program and look at the error message.
-
Correct the errors. Compile and run the program.
-
Change c in the word cout to C (capital letter). Compile the program and look at
the error message.
-
Correct the errors. Compile and run the program.
// Program: ... // Student: ... // Purpose: ... #includeusing namespace std;
int main ()
{ // declaring variables: int side; int squareArea; // input requirements: side = 4;
// process: squareArea = side * side;
// print out the result: cout << "The area of squre ("; cout << side; cout << "x"; cout << side; cout << ") is "; cout << squareArea << "." << endl; // terminate the program:
return 0; }
Homework #1: Modify the above program so that it finds the area of a triangle.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
