Print Star Patterns Using For Loops in C language

 


Answer:

#include<stdio.h>
int main()
{   int n;
    scanf("%d", &n);
    for (int i = 0i < ni++)
    {
        for (int j = 0j <= ij++)
        {
           printf("* ");
        }
        printf("\n");
    }
    
    return 0;
}

Comments

Popular posts from this blog

C program to find the greatest of three numbers with user input.

Access denied in VS code for gcc while doing C programming

How to add to integers in C programming