In this the following code , I check if a number ends in an 8 or not and if so I skip it.it The code works correctly; however,s I'd like to do this without hard coding every single number that ends in 8.
for(number1 = 0; number1 <= number2; number1++){
if(number1%2 == 0){
if(number1 == 8 || number1 == 18 || number1 == 28){
continue;
}
else{
cout << " " << number1<< endl;
}
}
}