C - Write program to write a for loop that counts backward from z (lowercase Z) to a (lowercase A)

Requirements

Write program to write a for loop that counts backward from z (lowercase Z) to a (lowercase A)

Demo

#include <stdio.h>

int main()/*from   w  w  w.j  a v a2s  .  co m*/
{
    char alphabet;

    for(alphabet='z';alphabet>='a';alphabet=alphabet-1)
    {
        printf("%c",alphabet);
    }
    putchar('\n');
    return(0);
}

Result

Related Exercise