用c++输入长和宽,输出矩形简单一些
时间: 2023-05-29 19:01:11 浏览: 295
roundness.zip_图形图像处理_Visual_C++_
```
#include <stdio.h>
int main() {
int length, width;
printf("请输入矩形的长和宽:\n");
scanf("%d%d", &length, &width);
printf("矩形的面积是: %d\n", length * width);
printf("矩形的周长是: %d\n", 2 * (length + width));
return 0;
}
```
阅读全文