#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:38 pm
© 允许规范转载