Write program to print the triangle of numbers.

#include<stdio.h>

#include<conio.h>

int main()

{

clrscr();

int i,j;

printf(“Welcome to www.candcpp.com”) ;

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

{

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

{

printf(“%d”,j);

}

printf(“\n”);

}

getch();

return 0;

}

 

Output will Be:

Welcome to www.candcpp.com

1

12

123

1234

12345