Posted By

b121417 on 02/25/10


Tagged

basic c pp


Versions (?)

Basic C++ Prog


 / Published in: C++
 

  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. cout << "Here's a list of the ASCII values of all the upper"
  6. << " case letters.\n";
  7. char letter = 'A';
  8. char zletter = 'Z';
  9.  
  10. while ( (int)letter <= (int)zletter){
  11. cout << letter << " " << (int)letter << endl;
  12. (int)letter++;
  13. }
  14.  
  15. //use this to stall the console output
  16. cin.ignore();cin.ignore();
  17. }

Report this snippet  

You need to login to post a comment.