Главная » 2017 » Ноябрь » 13 » 3_38
08:53
3_38

#include <iostream>
using namespace std;
int main()
{
    setlocale(LC_ALL,"rus_rus.1251");
    int a;
    bool flag=false;
    cin>>a;
    while (a!=999)
    {
        if (a<0)
            flag=true;
        cin>>a;
    }
    if (flag) cout<<"Есть отрицательные"<<endl;
    else cout<<"Нет отрицательных"<<endl;
    system("pause");
    return 0;
}

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