so, iwe been messíng arround with C++ for about 4 days now and here is my first real print all squarenumbers (it will break at a point) :

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

 do
{
cout << numbers*numbers << "\t\t\t" << numbers << "\n";
numbers = numbers+1;
Sleep(500);
}while (on==true);

}

good start, using the same program i'd do this little changes.

#include <iostream>
#include <windows.h>

//----------------------------
using namespace std;
//----------------------------

int main ()
{
    int  numbers = 1;

    do
    {
        cout << numbers*numbers << "\t\t\t" << numbers << "\n";

        numbers++;

        Sleep(500);
    }
    while (true);
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.