int main(void)
{
int number = 1;
do
{
if (number <= 10)
{
cout << "number is " << number << "\n";
number = number + 1;
}
elseif (number == 6 || number == 8)
{
}
} while (number <= 10);
Why do you think you need to put anything in the "else if"? What is it that you think your program should be doing when number is 6 or 8?
EDIT: In any case, your logic is messed up. if number is 6 (or 8), then the condition number <= 10 is true, so the number will be output anyway. You need to rethink the logic.