help me make this shorter.. i think this is too long.. i'm a newbie student..
#include <iostream.h>
#include <conio.h>
int main()
{
int x, n=0;
clrscr();
for(x=1;x<=5;x++)
cout << " " << x;
if(++n==5)
{
cout << " " << endl;
}
n=0;
for(x=2;x<=5;x++)
cout << " " << x;
if(++n==4)
{
cout << " " << endl;
}
n=0;
for(x=3;x<=5;x++)
cout << " " << x;
if(++n==3)
{
cout << " " << endl;
}
n=0;
for(x=4;x<=5;x++)
cout << " " << x;
if(++n==2)
{
cout << " " << endl;
}
n=0;
for(x=5;x<=5;x++)
cout << " " << x;
}
getch();
return 0;
}
help me pls.. ^_^