DevC++中这个代码错误 问题在哪??
错误提示724[Note]eachundeclaredidentifierisreportedonlyonceforeachfunctionitappearsin724[...
错误提示 7 24[Note] each undeclared identifier is reported only once for each function it appears in
7 24[Error] 'minute2' undeclared (first use in this function)
源代码如下
int main()
{
int hour1,minute1;
int hour2,mintue2;
scanf("%d,%d",&hour1, &minute1);
scanf("%d,%d",&hour2, &minute2);
int ih=hour2-hour1;
int im=minute3-minute1;
if(im<0){
im=60+im;
ih--;
}
printf("时间差是%d小时%d分钟\n",ih,im);
return 0;
} 展开
7 24[Error] 'minute2' undeclared (first use in this function)
源代码如下
int main()
{
int hour1,minute1;
int hour2,mintue2;
scanf("%d,%d",&hour1, &minute1);
scanf("%d,%d",&hour2, &minute2);
int ih=hour2-hour1;
int im=minute3-minute1;
if(im<0){
im=60+im;
ih--;
}
printf("时间差是%d小时%d分钟\n",ih,im);
return 0;
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询