This is a for loop program in which we will print a very simple pattern of numbers, with the help of the C Programming language.
#include <stdio.h>
void main()
{
int rows;
printf( "\nEnter the number of rows\n");
scanf("%d",&rows);
printf("\n");
for (int i = 1; i <= rows; i++)
{
for (int j = 1; j <= rows; j++)
{
printf("%d ", i);
}
printf("\n");
}
}
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP