Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
507 B
1
Indexable
Never
#include <iostream>

using namespace std;

int main()
{
    long income=0,temp=0;
    int i=0;
    bool flag=true;
    while (i<9 )
    {
        i++;
        std::cin >> income;

        income/=10;
        temp=income/10;

        if(temp>0||temp<9)
        {
            if(income >9 || income <0)
            {
                std::cout <<"Incorret number ! Please Try Again"<<endl;
                i--;
            }
        }
    }
std::cout<<"SUCCESS"<<endl;

return 0;
}