Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <cmath>
- #include <math.h>
- using namespace std;
- int a, b, c, d, e;
- int main(int argc, const char * argv[]) {
- a = 0;
- b = 0;
- c = 0;
- cin >> d;
- for(int i = 1; i <= d; i++){
- cin >> e;
- if(e == 0){
- a = a + 1;
- }
- else if(e > 0){
- b = b + 1;
- }
- else if(e < 0) {
- c = c + 1;
- }
- }
- cout << a << " " << b << " " << c;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement