0
Can we convert string input to a mathematical function ?
I want to create a program to solve mathematical function . How to do it?
4 ответов
+ 7
In c++.....Idk
But if java
//Thanks to someone I forgot
ScriptEngine(new ScriptEngineManager().getEngineByName("JavaScript")).eval("1+3")
js :
eval("1+3")
C++ I only know how to convert string to number.sir sorry
+ 6
No need to thanks. That is not the answer of your question yet
+ 2
There is a function atoi () in C/C++ for such conversion.
0
thanks