Output char in sequence with for loop - C Statement

C examples for Statement:for

Description

Output char in sequence with for loop

Demo Code

#include <stdio.h>  
int main( void )  
{  /*  w  w  w .ja  v  a  2s  .  co  m*/
    char let = 'F';  
    char start;  
    char end;  
      
    for (end = let; end >= 'A'; end--)  
    {  
        for (start = let; start >= end; start--)  
            printf("%c", start);  
        printf("\n");  
    }  
      
    return 0;  
}

Result


Related Tutorials