- 2

How can I make the pyramid by* in c?like * ** *** **** ***** until n line.

In c

31st Dec 2019, 4:43 PM
Abbasali
2 Réponses
+ 5
#include <stdio.h> int main() { int i,j,n; printf ("Enter the value of n\n"); scanf("%d",&n); for (i=1;i<=n;i++) { for (j=1;j<=i;j++) { printf ("* "); } printf ("\t\t"); } return 0; }
31st Dec 2019, 4:55 PM
Shaurya Barnwal
+ 3
Change \t into \n
31st Dec 2019, 5:06 PM
Shaurya Barnwal