+ 8

[🏆 Challenge 🏆] Math Operation From String

If I've got a string that is a mathematic equation and I want to split it and calculate it how can we do it. If i get the input as 1+2*3,i know how to convert the string 1,2,3 to Integer.but i don't know how to covert +,* from string type to operator. ex. :- String str = "5-7+88*3%9-(77+55)";

20th Oct 2017, 12:43 PM
Я. ♨
Я. ♨ - avatar
6 Respuestas
+ 5
@Happy MaCwAn 😶 I'm not cracking jokes here 😶
12th Jan 2018, 12:16 PM
Я. ♨
Я. ♨ - avatar
20th Oct 2017, 12:46 PM
Nikky Amresh
Nikky Amresh - avatar
+ 9
@Kartikey Sahu.. alert(eval(prompt())) //js 😂 Only c++, java & c
20th Oct 2017, 1:56 PM
Nikky Amresh
Nikky Amresh - avatar
+ 4
print(eval(input())) //Python🐍
20th Oct 2017, 1:55 PM
Kartikey Sahu
Kartikey Sahu - avatar
0
ok.....heres the most detailed STEp BY STEP EXPLAINED VERSION.... GIVE ANY INPUT... eg...4*78-34+5.9/6 works with ^ - + ÷ × these 5 operators...but prints all step cacuations https://code.sololearn.com/cbEt2Rn86C5l/?ref=app
21st Oct 2017, 3:59 AM
sayan chandra
sayan chandra - avatar
- 1
lol
11th Jan 2018, 5:00 PM
Happy MaCwAn...