PARKSIDE'S TRAINGLE
1
2 3
4 5 6
7 8 9 10
.....................
================================================ 1
2 3
4 5 6
7 8 9 10
.....................
/*Serial No.3 [swami35.cpp]*/
#include<stdio.h>
#include<conio.h>
void main()
{
int count,j,i,m,n;
clrscr();
printf("enter the no. of lines u want to print=");
scanf("%d",&m);
printf("enter the starting value=");
scanf("%d",&n);
count =n;
i=1;
for(i=1;i<=m;i++)
{
printf("\n");
for(j=1;j<=i;j++)
{
printf("%d",count);
count++;
if(count>=32764)
break;
}
}
getch();
}
No comments:
Post a Comment
If you have any doubt, feel free to ask...