M
mastmartelli
Guest
I have a system setup to generate random math problems, for example "3 + 5" or "10 / 5", I was wondering if there's anyway to convert them from strings into an actual operation? Say the variable is
and I want to do
where mathResult equals 3. Is that possible?
Code:
mathQuestion = "1 + 4 - 2";
Code:
// i know this does not work
mathResult = real(mathQuestion);