How can I make a "char loop"? I mean, a programm that writes all chars from a to z. Do I have to make it with for loop or how? Is there a possibility to make that with enum? Write your solutions.
Thx in advance
ALan
How can I make a "char loop"? I mean, a programm that writes all chars from a to z. Do I have to make it with for loop or how? Is there a possibility to make that with enum? Write your solutions.
Thx in advance
ALan
Code:for( char cValue = 'a'; cValue <= 'z'; cValue++ ) cout << cValue << endl;
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens
>How can I make a "char loop"? I mean, a programm that writes all chars from a to z.
>
With ASCII it is quite easy.
>Do I have to make it with for loop or how? Is there a possibility to make that with enum?
No, you do not have to
>Write your solutions.
>Thx in advance
Code:#include <iostream> int main (){ for(int i='a';i<='z';i++) std::cout<<(char)i; return 0; }