编译失败

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

LG_Sam @ 2024-05-20 21:37:53


by sdsswyd @ 2024-05-20 21:43:24

@LG_Sam 少了半个括号


by DFs_YYDS @ 2024-05-20 21:47:12

@LG_Sam 改成这样

#include<iostream>
using namespace std;
int apple[10],height;
int main(){
    for(int i=0;i<10;i++){
        cin>>apple[i];
    }
    cin>>height;
    int c=0;
    for(int i=0;i<10;i++){
        if(height+30>=apple[i]) c++;
    }
    cout<<c;
    return 0;
}

by LG_Sam @ 2024-05-22 20:06:54

谢谢


|