Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include
using namespace std; int main() { // Create integer variables int length = 4; int width = 6; int area; // Calculate the area of a rectangle area = length * width; // Print the variables cout << "Length is: " << length << "\n"; cout << "Width is: " << width << "\n"; cout << "Area of the rectangle is: " << area << "\n"; return 0; }
Length is: 4
Width is: 6
Area of the rectangle is: 24