CJCoding With Joseph
15free / daySign inCreate account

Define a struct type named Rectangle with two integer fields, width and height. In main, create a Rectangle, set its width to 5 and its height to 4, then print its area (width times height) exactly as: Area: 20 followed by a newline. You are combining struct fields with a simple multiplication.

Expected output

Area: 20

= newline. The output ends with a newline, so print one after the last line.

Hints4 available
Topics
Structs
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)

Your output

Run your code to see the output here...

Test cases

Run your code to see test case results.