some bug I meet
1. if(a>b,a<c) should be if(a>b&&a<c)
2. scanf forget'&''
3. exp1?exp2:exp3 instead of exp1?exp2;exp3。while for(;;)
4. As for exp1?exp2:exp3。exp==min=a,max=b 0;exp==(min=a,max=b) 1;
两个代码的区别
#include<stdio.h>
The first
intmain()
{
inti = 1, j = 1;
for(i = 1; i <= 6; i++)
{
for(j = 1; j < 7; j++)
printf("%d", j);
}
return0;
}
Output:123456123456123456123456123456123456
The second
intmain()
{
inti = 1, j = 1;
for(; i <= 6; i++)
{
for(; j < 7; j++)
printf("%d", j);
}
return0;
}
Outpput:123456
标签:min,exp3,exp2,exp1,inti,program,diary,printf,my From: https://blog.51cto.com/u_16287887/7763092