You are viewing this question as it will appear in the manual grading interface. Return to the normal view when you are done.

Workspace demo: VS Code (C++)

In the file source.cpp in the workspace linked below, write a program that outputs the perimeter of a rectangle of a user-provided integer length and width. Your output must match the example exactly, including the whitespace and the newline character at the end.

1
2
3
4
Enter the length: 5
Enter the width: 4
The perimeter of the rectangle is: 18
  
Open workspace

Correct answer

Student view placeholder

In student views this area is used for assessment and score info.
Tools

Staff information

Question

Title:
Workspace demo: VS Code (C++)

Variant

Started at:
2026-08-04 23:37:41 (CDT)
Duration:
0s
Show/Hide answer
{}
History
dec frac
rad deg