#include<iostream>
using namespace std;
int area(int x, int y)
{
    int a;
    a = x * y;
    return a;
}
int main()
{
    int length, width;
    cout << "请输入长方形的长度和宽度:";
    cin >> length >> width;
    cout << "该长方形的面积为:" << area(length, width) << "\n";
    return 0;
}
Last modification:December 5th, 2018 at 07:37 pm
如果觉得我的文章对您有帮助,请随意赞赏:)