+ 2

Convert Char input as digit?

Is it possible to accept user input as a char and then convert it into an integer to be able to perform calculations with it? Example; User inputs char 'A' as grade and then 'A' is converted to 12

5th Nov 2017, 1:17 PM
Toni Sedjoah
Toni Sedjoah - avatar
8 Answers
+ 8
@Toni what luka said
5th Nov 2017, 7:49 PM
David Akhihiero
David Akhihiero - avatar
+ 6
@Toni what luka said
5th Nov 2017, 7:49 PM
David Akhihiero
David Akhihiero - avatar
+ 6
Pls post the code here
5th Nov 2017, 8:22 PM
David Akhihiero
David Akhihiero - avatar
+ 6
Okay
5th Nov 2017, 8:29 PM
David Akhihiero
David Akhihiero - avatar
+ 1
do I have to import anything before this works? because I'm getting an error
5th Nov 2017, 8:19 PM
Toni Sedjoah
Toni Sedjoah - avatar
0
I just found the error and corrected it... thanks guys.. I really appreciate
5th Nov 2017, 8:28 PM
Toni Sedjoah
Toni Sedjoah - avatar