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
February 09, 2011
call by value and call by reference c++
August 19, 2015
C++ program to display numbers which get reversed after multiplying by 4
Comments
Post a Comment