C - Write program to output a three-letter acronym

Requirements

The program's output lists all three-letter combinations from AAA through ZZZ.

Hint

A triple nested loop contains three for statements.

Demo

#include <stdio.h>

int main()/*from  w  w w  .ja va2 s .c om*/
{
    int a,b,c;

    for(a='A';a<='Z';a=a+1)
    {
        for(b='A';b<='Z';b=b+1)
        {
            for(c='A';c<='Z';c=c+1)
            {
                printf("%c%c%c\n",a,b,c);
            }
        }
    }
    return(0);
}

Result

Related Exercise