+ 1

Kotlin help

How to edit this String in Kotlin "12+3/2*2" so that it's this "((12+3)/2)*2". And "12+3/2" to "(12+3)/2".

27th Feb 2022, 7:36 AM
okurpants
okurpants - avatar
4 Respostas
+ 1
A string is a sequence of characters. We can get specific characters from a string with indexing operations.
27th Feb 2022, 8:55 AM
JaScript
JaScript - avatar
+ 1
First of all thank you for the down voting of my first answer. Second I do not know what you did mean with „how to do this tho“. The question is unfortunately not clear for me and what goal is pursued with it. Furthermore ((12+3)/2)*2 is the same as (12+3)/2*2. To make it short, an exact task description is needed and best possible your attempt (a link to this code on Sololearn Playground).
27th Feb 2022, 12:28 PM
JaScript
JaScript - avatar
0
JaScript yea i get it but how to do this tho
27th Feb 2022, 9:17 AM
okurpants
okurpants - avatar
0
JaScript Yea I get that its the same but thats not the case they want it to be like this with two sub expressions
27th Feb 2022, 6:18 PM
okurpants
okurpants - avatar