Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
387 B
0
Indexable
Never
#include <iostream>
using namespace std;

void bigw(int m[], int const size, string a) {
	int j = 0, b = 0;
	for (int i = 0; i < a.size(); i++) {
		if (a[i] >= 65 and a[i] <= 90) {
			m[j] = i;
			b++;
			j++;
		}
		
	}
	for (int i = 0; i < b; i++) {
		cout << m[i] << ' ';
	}
}

int main() {
	int mas[100], n;
	string a;
	cin >> n;
	cin >> a;
	bigw(mas, n, a);
}
Leave a Comment