Untitled

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

using namespace std;

int main()
{
    int num, digit;
    cout<<"Enter a number:\n";
    cin>>num;
    if(num<1000||num>9999 && num>-1000||num<-9999)
    {
        cout<<"Error!\n";
    }
    
    cout<<"Enter a digit:\n";
    cin>>digit;
    if(digit>9||digit<=-9)
    {
        cout<<"Error!\n";
    }
    
    return 0;
}