#include <iostream>
using namespace std;
signed main(){
int cnt = 0, n;
cin >> n;
while(n--){
int x;
cin >> x;
cnt += (x > 0);
}
cout << cnt;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
using namespace std;
signed main(){
int cnt = 0, n;
cin >> n;
while(n--){
int x;
cin >> x;
cnt += (x > 0);
}
cout << cnt;
}