write a program to printing following pattern in c.



QUESTION:- write a program to printing following pattern in c. 

 

5 5  

5 5 5 

5 5 5 5  

5 5 5 5 5 


#include <stdio.h>

#include <conio.h>

int main()

{

    int ijno;

    printf("enter a value: ");

    scanf("%d", &no);

    for (i = 1i <= noi++)

    {

        for (j = 1j <= ij++)

        {

            printf("%d "no);
        }

        printf("\n");
    }

    return 0;

    getch();
}

OUTPUT
enter a value: 5
5     
5 5   
5 5 5 
5 5 5 5
5 5 5 5 5

Follow our page for regular updates.

0 Comments