dimanche 13 mars 2022

Arithmatic Expression Generate using Kotlin

I'm working on the ARethmatic Expression Generator Mobile app on Kotlin, I need a way to generate valid random arithmetic expression generation code with kotlin,

Examples of valid arithmetic expressions are:

2*3
(6+4)/2
((10-2)*3)/4

Examples of invalid arithmetic expressions are:

(2*3) no parentheses for 2 terms, i.e. should be 2*3
6+(4/2) parentheses should be placed from left to right, i.e. should be (6+4)/2
(10-2)*3/4 parentheses are missing, i.e. should be ((10-2)*3)/4



Aucun commentaire:

Enregistrer un commentaire