Solution for Exercise 9-12
ex0912
#include <stdio.h>
int main()
{
char 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);
}
Output
Notes
* You could classify the three variables as integer values, which doesn't affect the rest of the code.
* It would also be acceptable to use the \t escape sequence in Line 13 instead of \n. If so, remember to add a putchar('\n') at the end to clean up the last line of output.
Copyright © 1997-2025 by QPBC.
All rights reserved
