Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
345 B
1
Indexable
Never
#include <iostream>

	using namespace std;

	int main() {
		int mas[100];
		int max0=0, max1=0;
		for (int i = 0; i < 100; i++) {
			cin >> mas[i]; 
				if (mas[i] == 0) {
					max0++;
				}
				if (mas[i] == 1) {
					max1++;
				}
				if (mas[i] == -1) {
					break;
				}
			
	}
		cout << max0 << " " << max1 << endl;
}
Leave a Comment