C 简单1
#include <stdio.h> #define Height 10 int main(){ int width; int clong; int result; printf("请输入长方形的宽:\n"); scanf("%d", &width); printf("请输入长方形的长:\n"); scanf("%d", &clong); result = Tiji(width, clong); printf("长方形的体积是:%d", result); return 0; } int Tiji(int width, int clong){ return width * clong * Height; }