Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. using namespace std;
  6. char chChar;
  7. while (1==1)
  8. {
  9. cin >> chChar;
  10. cout << chChar << " has ASCII code " << (int)chChar << endl;
  11. }
  12. }
  13.  
  14.  
  15. jeremy@phobos:~/programs$ ./char
  16. karl roesner
  17. k has ASCII code 107
  18. a has ASCII code 97
  19. r has ASCII code 114
  20. l has ASCII code 108
  21. r has ASCII code 114
  22. o has ASCII code 111
  23. e has ASCII code 101
  24. s has ASCII code 115
  25. n has ASCII code 110
  26. e has ASCII code 101
  27. r has ASCII code 114
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement