01.11.2014, 19:15
Quote:
Take a look at how strings work. When modifying certain digits of something this is the easiest way to go.
If you read a bit about how to use them and what you can do with them youll probably find the answer quickly. About your code: in the last line youre trying to get a double from the input. A double is just like a float but with higher precision. Its certainly not a String or (char)acter and so cant hold the character you entered, so you have to use a different datatype there. |
Char ch = input.nextChar();
Still i need to figure out how to replace 2nd and 4th in num and replace it with integer d.
As well display the precedent and the letter that comes after ch before&after the number.