Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
226 B
0
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
	
	int a = 1, i = 1, max = 0, maxi;
	while (a > 0) {
		cin >> a;
		if (a > max) {
			max = a;
			maxi = i;
		}
		i++;


	}
	cout << max << ' ' << maxi;
}