#include<stdio.h> #define Height 10 #include<iostream> int calculate(int Long, int Width); int main() { int m_Long; int m_Width; int result; printf("长方形的高度为:%d\n", Height); printf("请输入长度\n"); scanf("%d", &m_Long); printf("请输入宽度\n"); scanf("%d", &m_Width); result = calculate(m_Long, m_Width); printf("长方形的体积是:"); printf("%d\n", result); system("pause"); return 0; } int calculate(int Long, int Width) { int result = Long*Width*Height; return result; } //请问int calculate(int Long, int Width)与calculate(m_Long, m_Width)有什么关系,为什么 m_Long和Long可以互相赋值哪? //
guozhchun
相关分类