I want to input only values between 2 - 7 what is wrong?
do{
cout<<"Podaj wykladnik\n";
cin>>b;
}while(b<=2 && b>=7);
Think about it. What value of b can be less than or equal to 2 and, at the same time, be greater than or equal to 7?
Hey Robsonmg,
b <= 2 ( b is less than or equal to 2)
and
b >= 7 (b is greater than or equal to 7)
take a look at these two pieces of code and you should realize the error that we have all made from time to time.