this is a part of my programme
how do i modify it such that the user can only enter positive integer?
int R1, R2, X1, X2;
cout<<"Enter real part of impendence A: ";
cout<<"Enter imaginary part of impedence A: ";
cout<<"Enter real part of impedence B: ";
cout<<"Enter imaginary part of impedence B: ";
invalid input will stop the next statement and return to the first.
for eg. if the user entered alphabet "a" or any other alphabet it will show "Please enter an integer value!" the programme will then loop back to the first cout.