[Solved] Write a in c program using loop control to produce the following output [closed]


You can try this, by simply using char as binary operator and the Increment and Decrement can be applied on chars as well as on integer.
If you want to get input from the user you can use the scanf(“%c”) to read the chars and use them

char i,j;
    for ( i = 'G'; i >= 'A'; i--) { //with G and reduce it by one to get the next ending char
        for (j = 'A'; j <= i; j++) {//start with 'A' to begin every newline
            printf("%c ",j);
        }
        printf("\n");
    }

output:

A B C D E F G 
A B C D E F 
A B C D E 
A B C D 
A B C 
A B 
A

0

solved Write a in c program using loop control to produce the following output [closed]