I am trying to learn and the program goes through a loop starting at 0 to 300000. Than I just want it to generate a random number. Ultimately what I want to do is do a GUI speed test for the computer that goes through a loop from 0-1million and see how long it takes to finish.
Code:
#include <iostream> // Includes cout, endl, cin.get, etc.
#include <cstdlib> // Includes rand()
using namespace std;
int main()
{
int loop = 0;
while ( loop <= 300000 ) {
cout << loop << endl;
loop++;
}
cin.get();
}
int sparky()
{
int randomnumber = rand();
cout << randomnumber << endl;
cin.get();
}