C语言一道改错题求教
FOUND下表示下一行有错,————————表示需要填写新内容,其他地方不能改哦#include<stdio.h>intmaxiNum=0;voiddispMaxNum(...
FOUND下表示下一行有错,————————表示需要填写新内容,其他地方不能改哦
#include <stdio.h>
int maxiNum = 0;
void dispMaxNum();
int main(void)
{
int i, oneNumber, maxNumber = 0;
printf("Please input 10 int number:");
{
int maxNumber = 0;
/*********Found************/
_________________________
for (i = 0; i < 10; i++)
{
scanf("%d", &oneNumber);
if (oneNumber > maxNumber)
{
maxNumber = oneNumber;
printf("maxNumber=%d\n", maxNumber);
}
}
}
/*********Found************/
__________________________
/*********Found************/
_____________________________________
dispMaxNum();
return 0;
}
void dispMaxNum()
{
/*********Found************/
printf("maxNumber=%d\n", maxNumer);
} 展开
#include <stdio.h>
int maxiNum = 0;
void dispMaxNum();
int main(void)
{
int i, oneNumber, maxNumber = 0;
printf("Please input 10 int number:");
{
int maxNumber = 0;
/*********Found************/
_________________________
for (i = 0; i < 10; i++)
{
scanf("%d", &oneNumber);
if (oneNumber > maxNumber)
{
maxNumber = oneNumber;
printf("maxNumber=%d\n", maxNumber);
}
}
}
/*********Found************/
__________________________
/*********Found************/
_____________________________________
dispMaxNum();
return 0;
}
void dispMaxNum()
{
/*********Found************/
printf("maxNumber=%d\n", maxNumer);
} 展开
2个回答
展开全部
我帮你看了一下问题处在for语句里面 下面是修改以后的结果,你好好看看不会再问我吧
/*********Found************/
_________________________
for (i = 0; i < 10; i++)
{
scanf("%d", &oneNumber);
if (oneNumber > maxNumber)
{
maxNumber = oneNumber;
}
printf("maxNumber=%d\n", maxNumber);//这里是修改的
}
/*********Found************/
_________________________
for (i = 0; i < 10; i++)
{
scanf("%d", &oneNumber);
if (oneNumber > maxNumber)
{
maxNumber = oneNumber;
}
printf("maxNumber=%d\n", maxNumber);//这里是修改的
}
展开全部
把函数重新定义一下吧,我改成如下:
#include <stdio.h>
int maxiNum = 0;
void dispMaxNum(int a);
int main(void)
{
int i, oneNumber, maxNumber = 0;
printf("Please input 10 int number:");
{
int maxNumber = 0;
for (i = 0; i < 10; i++)
{
scanf("%d", &oneNumber);
if (oneNumber > maxNumber)
{
maxNumber = oneNumber;
printf("maxNumber=%d\n", maxNumber);
}
}
}
dispMaxNum(maxNumber);
return 0;
}
void dispMaxNum(int maxNumber)
{
printf("maxNumber=%d\n",maxNumber);
}
#include <stdio.h>
int maxiNum = 0;
void dispMaxNum(int a);
int main(void)
{
int i, oneNumber, maxNumber = 0;
printf("Please input 10 int number:");
{
int maxNumber = 0;
for (i = 0; i < 10; i++)
{
scanf("%d", &oneNumber);
if (oneNumber > maxNumber)
{
maxNumber = oneNumber;
printf("maxNumber=%d\n", maxNumber);
}
}
}
dispMaxNum(maxNumber);
return 0;
}
void dispMaxNum(int maxNumber)
{
printf("maxNumber=%d\n",maxNumber);
}
追问
大哥,我说了其他的地方不能修改啊,我晕,点错了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询