Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
224 B
0
Indexable
Never
#include <string>
#include <iostream>
using namespace std;
int main()
{
	int a=0, b=0, c=0, d;
	for (int i = 0; a>=0; i++)
	{
		cin >> a;
		if (c < a) {
			c = a;
			d = i;
		}
	}
	cout << c << " " << d + 1;
}