- 1
How to make a string calculator ? Java
What he need make - 100" + "500" Output: "100500" Input: "Hi World!" - "World!" Output: "Hi " Input: "Bye-bye!" - "World!" Output: "Bye-bye!" Input: "Java" * 5 Output: "JavaJavaJavaJavaJava" Input: "Example!!!" / 3 Output: "Exa"
5 Answers
+ 5
I think you need to include more information and perhaps your attempt. Can you write your code into the code playground and attach that here?
What does a string calculator do?
What doesn't your code do?
+ 3
You can separate each word in a sentence using split() and then you can put them in an array and take off the part you don't want etc
+ 2
That's not how this forum is supposed to work.
You now need to look up and do some work yourself. If there's a problem with your code, add it here and someone can help correct it.
+ 1
Can you please send me the code, how it will look like, I really need it, I will be grateful
+ 1
Thx for help guys, you help me)