Главная » 2017 » Октябрь » 30 » 3_33
11:03
3_33

#include <iostream>
using namespace std;
int main()
{
    setlocale(LC_ALL,"rus_rus.1251");
    int a,b,max=0;
    cin>>a;
    while (a>0)
    {
        b=a%10;
        if (b>max) max=b;
        a=a/10;
    }
    cout<<max<<endl;
    system("pause");
    return 0;
}

Просмотров: 406 | Добавил: denjes | Рейтинг: 0.0/0
Всего комментариев: 0
avatar