scanf有什么问题呢?请大佬帮帮忙~
c吧
全部回复
仅看楼主
level 1
珍惜儿88 楼主
scanf("%d",&n);有什么问题呢?一直有波浪线警告⚠️
求长方体体积的代码
#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("输入宽度\n");
scanf("%d", &m_Width);
result = calculate(m_Width, m_Long);
printf("长方体的体积是:");
printf("%d\n", result);
return 0;
}
int calcuate(int Long, int Width)
{
int result = Long*Width*Height;
return result;
}
2022年09月06日 01点09分 1
level 1
建议用Linux编译c代码
2022年09月06日 02点09分 2
level 1
scanf_s试试
2022年09月20日 15点09分 5
1