Pattern 2
Anonymous
c_cpp
01/26/2024 6:36 AM
544 B
33
Indexable
// Online C compiler to run C program online
#include <stdio.h>
int main()
{
int n, y;
printf("Enter Value Of n \n");
scanf("%d", &n);
printf("Enter Value Of y \n");
scanf("%d", &y);
for (int i = 0; i < n-1; i++)
{
if (i == y - 1)
printf("\n");
for (int j = 0; j < n; j++)
{
printf("* ");
}
printf("\n");
}
}Editor is loading...
Leave a Comment