star pattern to print right angled triangle in C language with user defined row and colums | (star pattern code 2) | (Program 16)
/* Made by Anmol main
student B.tech CSE
Punjabi university
Program 16 */
#include<stdio.h>
int main()
{int i,j,a,b;
printf("Enter the number of rows\n");
scanf("%d",&a);
printf("Enter the number of colums\n");
scanf("%d",&b);
for(i=0;i<a;i++)
{ printf("\n");
for (j=0;j<b;j++)
{
if (i>=j)
{printf("* "); }
else
printf(" ");
}
}
}
Comments