Problem Statement:
Write a program to Print the right angle triangle Pattern Numbers with * in between them.
Solution
n--> Number of Rows
#include<stdio.h>
#include<stdlib.h>
int main()
{
int n,i,k=1,j;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
if(j<i)
printf("%d*",k++);
else
{
printf("%d", k++);
}
}
printf("\n");
}
}
INPUT:
5 //Number of rows
OUTPUT:
1
2*3
4*5*6
7*8*9*10
11*12*13*14*15