- #include <iostream>
- #include <cstdio>
- #define Height 10
- using namespace std;
- int main()
- {
- int longcf;
- int width;
- int volume;
- printf("长方体的高度为:% d",Height);
- printf("请输入长度");
- scanf("% d",&longcf);
- printf("请输入宽度");
- scanf("% d",width);
- volume=longcf*width*Height;
- printf("长方体的体积是:");
- printf("% d",volume);
- }
复制代码 |