How can I make a character be recognizes as a value? for example;
I'm asked for an input, I enter "3k", how can I make that "k" be recognized as the value (*1000)? I know how to make the k be recognized as a character, but I can figure out how to give it a value upon input.
Yes this is for homework, but I think that what I want to do is beyond what we are studying, so if somebody could just point to to what I should be looking for, Ill be happy to just learn how to do it, I'm just not sure what to look for.
Thanks.
I'm asked for an input, I enter "3k", how can I make that "k" be recognized as the value (*1000)? I know how to make the k be recognized as a character, but I can figure out how to give it a value upon input.
Yes this is for homework, but I think that what I want to do is beyond what we are studying, so if somebody could just point to to what I should be looking for, Ill be happy to just learn how to do it, I'm just not sure what to look for.
Thanks.