C Exercises - Display The Pattern Like Right Angle Using An Asterisk - W3resource
C Exercises - Display The Pattern Like Right Angle Using An Asterisk - W3resource
w3resource (https://www.w3resource.com/index.php)
Sample Solution:
C Code:
1 #include <stdio.h>
2 void main()
3 {
4 int i,j,rows;
5 printf("Input number of rows : ");
6 scanf("%d",&rows);
7 for(i=1;i<=rows;i++)
8 {
9 for(j=1;j<=i;j++)
10 printf("*");
11 printf("\n");
12 }
13 }
Sample Output:
https://www.w3resource.com/c-programming-exercises/for-loop/c-for-loop-exercises-9.php 1/1