Umi Devi
Weblog From a Girl for All People and Telling About All Infomation
Jan 31, 2007
C++ Program to print pyramid of numbers
C++ program to print pyramid of numbers.
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
main()
{
clrscr();
int i,k;
for (i=1;i<=5;i++)
{
for (k=i;k<=i;k++)
{
cout<<k;
}
cout<<endl;
}
getch();
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment