在vc2013上运行的提示 error C2062: 意外的类型“long”
#define_CRT_SECURE_NO_DEPRECATE#include<stdio.h>#defineheight10intcalculate(intlong,i...
#define _CRT_SECURE_NO_DEPRECATE
#include<stdio.h>
#define height 10
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("%d", &m_width);
scanf("%d", &m_width);
result = calculate(m_long, m_width);
printf("长方体的体积是:");
printf("%d\n", result);
return 0;
}
int calculate(int long, int width)
{
int result = width*height*long;
return result;
} 展开
#include<stdio.h>
#define height 10
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("%d", &m_width);
scanf("%d", &m_width);
result = calculate(m_long, m_width);
printf("长方体的体积是:");
printf("%d\n", result);
return 0;
}
int calculate(int long, int width)
{
int result = width*height*long;
return result;
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询