Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Homework 2 (100 Points) Instructions: Complete the following questions. Upload t

ID: 2247906 • Letter: H

Question

Homework 2 (100 Points) Instructions: Complete the following questions. Upload the solutions to the D2L dropbox folder. Only problems marked as "upload as source" are required to be written as compliable .cpp iles. (Write below, no need to upload cpp file) Write a shortC++code snippet which implements the following questions. You are required to write out the main function, however library includes and using namespace std are not required to be written. a) Write a program which calculates and prints the area of a 5x4 rectangle. Implement this 1. by declaring two integers, width and height, and set them to 5 and 4 respectively. Declare a third variable named area, and store the result of the calculation of the rectangle area into it. Finally print the result

Explanation / Answer

void main()

{

int width,height,area;

width = 5;

height = 4;

area = width*height;

getch();

}