執行 ❯
建立您
自己的
網站
×
更改方向
更改主題,深色/淺色
前往 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