Print number from 1 to 25 in row and coloumn

 


#include <stdio.h>


int main()

{

    int row,col,z=1;

    for(row=1;row<=5;row++)

    {

        for(col=1;col<=5;col++)

    {

        printf("%d",z);

        z++;

    }

    printf("\n");

    }


    return 0;

}


output

 1  2  3  4  5

  6  7  8  9 10

 11 12 13 14 15

 16 17 18 19 20

 21 22 23 24 25


Comments

Popular posts from this blog

C Programme to find Area Of Rectangle

C programme to reverse the number