2 Aug 2019

  • August 02, 2019
  • Amitraj










/* C Program to print the following triangle pattern for given n*/       By Amit raj purohit 
  
#include<stdio.h>
int main()
{
int i,j,n;
printf("Enter a no:");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
printf("%d",j);
printf("\n");
}
return 0;
}


INPUT/OUTPUT:
Enter a no:5
1
12
123
1234
12345


http://codevidyalay.blogspot.com



Translate

Popular Posts