print the following pattern



QUESTION:- print the following pattern  

 

B  

C C  

D D D 

E E E E  



#include <stdio.h>

#include <conio.h>

int main()

{

    int ijalp;

    printf("enter a value: ");

    scanf("%d", &alp);

    char ch = 'A';

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

    {

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

        {

            printf("%c "ch);
        }

        ch++;

        printf("\n");
    }

    return 0;

    getch();
}


OUTPUT

enter a value: 5 

 

B  

C C  

D D D 

E E E E  


Follow our page for regular updates.

0 Comments