0
#include <iostream>
#include <windows.h>
//----------------------------
using namespace std;
//----------------------------   
int main () 
{
long int numbers=1;
bool on = true;

while (on==true) do
{
cout << numbers*4;
numbers = numbers+1;
Sleep(500);
}

}//--breaks here

how come the loop not work?

3
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by Miganders
0

what my compiler writes when i try to compile:
18. expected `while' before '}' token
18. expected `(' before '}' token
18. expected primary-expression before '}' token
18. expected `)' before '}' token
18. expected `;' before '}' token

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.