为啥错了啊....

P1046 [NOIP2005 普及组] 陶陶摘苹果

小骁` @ 2019-11-03 15:28:58

include<stdio.h>

int main() { int a[12]; int b,i,c,sum; c=0; sum=0; for(i=0; i<10; i++) scanf("%d ",&a[i]); printf("\n"); scanf("%d",&b); for(i=0; i<10; i++) { if( (b+30)>a[i]) c++; } printf("%d",c); return 0; }


by 第0小蒟蒻 @ 2019-11-03 15:36:42

碰到就算,所以是(b+30)>=a[i]


|