A492.矩形计算题解:
2026-02-24 12:46:48
发布于:四川
0阅读
0回复
0点赞
A492.矩形计算
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
if(c==1){//c为1时表示求面积,c为2时表示求周长
cout << a*b;
}else cout << (a+b)*2;
return 0;
}
这里空空如也






有帮助,赞一个