Contact: aviboots(AT)netvision.net.il
31,104 questions
40,777 answers
573 users
#include <iostream> using namespace std; int main() { char ch = '3'; int n = ch - '0'; cout << n << endl; return 0; } /* run: 3 */
#include <iostream> using namespace std; int main() { char ch = '5'; int n = ch - 48; cout << n << endl; return 0; } /* run: 5 */