0

c++ - How to print next letters until Z and continue to A?

Please help me

23rd Oct 2022, 7:56 AM
Zizo
Zizo - avatar
2 Réponses
+ 2
Write a for loop that uses a char type as the index. Initialize the index to the char literal 'Z'. Define the loop condition to end after the index reaches 'A'. Decrement the index by 1 each time through the loop. Inside the loop print the char loop index.
23rd Oct 2022, 3:28 PM
Brian
Brian - avatar
0
What about this? for(int i = 65; i < 91; i++) cout << (char) i << endl;
23rd Oct 2022, 3:26 PM
A͢J
A͢J - avatar