Pages

Saturday, 19 May 2012

program to print this Series by user


57./*Write a program to print this Series by user :-

#include<stdio.h>
#include<conio.h>
void main()
{
int n,i,j;
clrscr();
printf("Enter How Many Lines You Want IN This Figure:");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("\n");
}
getch();
}


OUTPUT
            Enter How Many Lines You Want IN This Figure:4
            1
            1 2
            1 2 3
            1 2 3 4

No comments:

Post a Comment