Pyramid Problem No. 9

Q.9  Write a program to generate a following numbers structure:
          11111
          22222
          33333
          44444
          55555

Solving in C:
       

#include <stdio.h>

int main(){

    int row,col;

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

        for(col=1;col<=5;col++) printf("%d",row);

        printf("\n");

    }

    return 0;

}

Comments

Popular posts from this blog

Pyramid Problem No. 90

Pyramid Problem No. 74

Pyramid Problem No. 85