C : Program to print nth number in nth rows and columns
Oct 23, 2023
Program :
//c program to print nth number in nth rows and columns
#include<stdio.h>
int main()
{
int n;
printf("Enter nth number : ");
scanf("%d", &n);
for(int i=1; i<=n; i++)
{
for(int j=1; j<=n; j++)
{
printf("%d ", j);
}
printf("\n");
}
return 0;
}
Output :