c++ Beginner issue ( code works but slow)

Pages: 12
To clarify. I did not omit the cout statement. I just redirect the stream to the void.
All I did was simply move the cout statement after the while loop so that it prints out the statement when its completed.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>

using namespace std;


int main()
{
    int bacon = 0;

    while(bacon <=999999999)
                {
                bacon++;
                }
cout << "im done" << endl;
    return 0;
}
Topic archived. No new replies allowed.
Pages: 12