Write a program to print the pattern - till n . n is given

Written by Sharad Raj on 13th of March, 2018

BASIC PROGRAMS   C LANGUAGE PROGRAMS

PROGRAM CODE

**1**



**1 2**



**1 2 3**



**1 2 3 4**


 

#include<stdio.h>

#include<conio.h>

void main()

{

int i,n,j;

clrscr();

printf(Enter the value of n : );

scanf(%d,&n);

for(i=1;i<=n;i++)

{

for(j=1;j<=i;j++)

{

printf(%d,j);

}

printf(“\n);

}

getch();

}