运行 ❯
获取您
自己的
网站
×
更改方向
更改主题,深色/浅色
前往 Spaces
#include <iostream> 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; }
长度为:4
宽度为:6
矩形的面积为:24