Pyramid Problem No. 6

 Q.6 Write a program to generate a following numbers structure:

          12345
          12345
          12345
          12345
          12345

Solving in C:
                

#include <stdio.h>

int main()

{

    int row,col,count;

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

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

        printf("\n");

    }

    return 0;

}

Comments

Popular posts from this blog

Pyramid Problem No. 85

Pyramid Problem No. 86

Pyramid Problem No. 77