Skip to main content
Search
Search This Blog
My Online Learning
Featured
July 12, 2020
functions in Python
Share
Get link
Facebook
X
Pinterest
Email
Other Apps
Labels
C++ program to print number pattern
July 19, 2013
C++ program to print number pattern
/*program to print following pattern
1
3 2
6 5 4
10 9 8 7
*/
#include<iostream.h>
#include<conio.h>
void main(void)
{ clrscr();
int i,j,k=1,l;
for(i=1;i<=4;i++)
{
for(j=1;j<=i;j++,k++)
l=k;
for(j=1;j<=i;j++)
cout<<l--<<" ";
cout<<"\n";
}
getch();
}
Comments
Popular Posts
October 25, 2015
How to create foreign key in Mysql
July 12, 2020
functions in Python
Comments
Post a Comment