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;

  1. Type in the program given below as is. Make sure you have no typos.

  2. Compile and run the program.

  3. Remove in the line int side; Compile the program and look at the error message.

  4. Correct the errors. Compile and run the program.

  5. Remove side in the line int side; Compile the program and look at the error message.

  6. Correct the errors. Compile and run the program.

  7. Remove int in the line int side; Compile the program and look at the error message.

  8. Correct the errors. Compile and run the program.

  9. Change c in the word cout to C (capital letter). Compile the program and look at

    the error message.

  10. Correct the errors. Compile and run the program.

// Program: ... // Student: ... // Purpose: ... #include  using 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!