Jump to content
Gonzalez

[C++] Simple Number Spammer

Recommended Posts

Posted
// 
#include <iostream>
#include <windows.h> // including the windows library for the Sleep command
using namespace std;

int main()
{
int iFinal, iNumber;
bool szContinue; // Bool is used for "true" or "false" statements

iNumber = 0;
iFinal = 0;
szContinue = true;

while(szContinue)
{
if(iNumber < 1000000000) // this means while iNumber is less than 500 loop aga
{
iFinal = iFinal +1;
iNumber = iNumber + 1;

printf("%d \n", iFinal);

Sleep(1); // Sleeps or waits 250 ms
}
else // Else means when iNumber hits 500 it will stop
{
szContinue = false;
}
}

cin.get();

return 0;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...