首页上一页 1 下一页尾页 1 条记录 1/1页
这个程序是哪不对吗?求解
发表在C语言图书答疑
2016-10-19
是否精华
是
否
版块置顶:
是
否
#include<stdio.h>
#define Height 10
int calculate(int Long, int Widht);
int main() {
int m_Long;
int m_Widht;
int result;
printf("长方体的高为:%d\n", Height);
printf("请输入长方体的长:%d\n");
scanf("%d", &m_Long);
printf("请输入长方体的宽:%d\n");
scanf("%d", &m_Widht);
result = calculate(m_Long, m_Widht);
printf("长方体的体积:");
printf("%d\n", result);
return 0;
}
int calculate(int Long, int Widht);
{
int result = Long*Widht*Height;
return result;
}
老是显示第19行有问题,帮忙解一下,为什么?
#define Height 10
int calculate(int Long, int Widht);
int main() {
int m_Long;
int m_Widht;
int result;
printf("长方体的高为:%d\n", Height);
printf("请输入长方体的长:%d\n");
scanf("%d", &m_Long);
printf("请输入长方体的宽:%d\n");
scanf("%d", &m_Widht);
result = calculate(m_Long, m_Widht);
printf("长方体的体积:");
printf("%d\n", result);
return 0;
}
int calculate(int Long, int Widht);
{
int result = Long*Widht*Height;
return result;
}
老是显示第19行有问题,帮忙解一下,为什么?