Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
373 B
0
Indexable
Never
#include<iostream>
#include<vector>
using namespace std;
int main() {
	vector<int> arr;
	int b;
	int i;
	setlocale(LC_ALL, "Russian");
	while (cin >> b) {
		if (b == 0) {
			break;
		}
		i = 0;
		arr.push_back(b);
		for (auto c : arr) {
			if (c == b) i++;
		}
		cout << "Число "<< b << " повторяется "<<  i - 1 << " раз" << endl;
	}
}