Untitled

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

int main() {
	setlocale(LC_ALL, "Russian");
	int a, b = 0, c = -1, n;
	cin >> n;
	for (int i = 1; i < n + 1; i++) {
		cin >> a;
		if (a > c) {
			c = a;
			b = i;
		}
	}
	cout << "Максимальный балл: " << b << " (" << c << " баллов" << ')';
}
Leave a Comment