I am really into the basics of programming and while writing a few lines of code to convert Celsius to Fahrenheit, which is pretty easy I started to wonder the following: Can I make the program show me an answer depending if I wrote in the Console: 25C //to convert to F or for example 100F // to convert to C
So far my knowledge goes to advanced "if" constructs and "for" cycles. Just started to study "do-while".
I am missing some knowledge how to properly search an input for number && specific char in order to give proper calculation.
I know that it seems a little complicated to make input : 25F // in one line instead of
25
F
but this will expand my knowledge and understanding. I will try the latter now, should be easy, but can't find out how to do the former.
Thanks in advance! Darin