Tweet
/* Program to print number sequence in C++
1
212
32123
4321234
543212345 */
#include<iostream>
#include<stdio.h>
main()
{
int i,s=5,j,k;
for(i=1;i<=5;i++)
{
for(k=1;k<=s;k++)
std::cout<<" ";
s--;
for(j=i;j>=1;j--)
std::cout<<j;
for(j=2;j<=i;j++)
std::cout<<j;
std::cout<<"\n";
}
}
Program to print number sequence in C++ (1)
Posted by
LAHAUL SETH
~
Program to print number sequence in C++ (1)
2012-05-01T08:08:00+05:30
LAHAUL SETH
C++
|
cplusplus
|
Comments
Program to print number sequence in C++ (1)
2012-05-01T08:08:00+05:30
LAHAUL SETH
C++
|
cplusplus
|