fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. char ch;
  7. int val;
  8. cin>>ch;
  9. val=ch-'A';
  10. cout<<val;
  11. return 0;
  12. }
Success #stdin #stdout 0s 3472KB
stdin
B
stdout
1