Solution for Exercise 9-10
ex0910
#include <stdio.h> int main() { char alphabet; for(alphabet='z';alphabet>='a';alphabet=alphabet-1) { printf("%c",alphabet); } putchar('\n'); return(0); }
Output
zyxwvutsrqponmlkjihgfedcba
Notes
* The changes from Listing 9-4 in the book all take place at Line 7:
The 'A'
is changed to 'z'
The <
is changed to >
The 'Z'
is changed to 'a'
And the +1
is change to -1
Copyright © 1997-2024 by QPBC.
All rights reserved