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
2 2
3 3 3
4 4 4 4
5 5 5 5 5
main()
{
clrscr();
int i,k;
for (i=1;i<=5;i++)
{
for (k=1;k<=i;k++)
{
cout<<i;
}
cout<<endl;
}
getch();
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment