Автор - animeshnikkitik
Ответ:
#include <iostream>
int main() {
int max = 0, k;
do {
std::cin >> k;
if(k!=0 && (max == 0 || max < k))
max = k;
} while(k);
if(max)
std::cout << "max = "<< max << std::endl;
system("pause");
return 0;
}