0

Inputs.kotlin

fun main(args:Array<String>){ print("Enter name:") var name= readLine() print("Enter age:") var age:Int= readLine()!!.toInt() print("Enter department:") var dep:String? dep= readLine() print("Enter pi:") var pi:Double= readLine()!!.toDouble() println("**** output *****") println("name:"+ name) println("age:"+ age) println("department:"+ dep) println("PI:"+ pi) }

10th Feb 2019, 10:27 AM
@4_4mh
@4_4mh - avatar
5 Respostas
+ 7
@4_4mh do you want to ask any query related to the linked code please provide some extra information regarding this to get helpful answer
10th Feb 2019, 10:57 AM
GAWEN STEASY
GAWEN STEASY - avatar
+ 7
You can do some manipulation like this way. I have update with using the class feature and make an code just take it as an example and made your own. https://code.sololearn.com/c1P6SbaoSoGe/?ref=app
10th Feb 2019, 12:18 PM
GAWEN STEASY
GAWEN STEASY - avatar
+ 6
@4_4mh your current code is for taking user input the name age department and pi and printing them now what kind of operation do you want to perform is the question because with this data you can only do two things like join the department name and employee name but that is not an need here. If you want to perform any arithmetic operations then make logic of that under any condition and execute that.
10th Feb 2019, 12:03 PM
GAWEN STEASY
GAWEN STEASY - avatar
0
I’m ask for how i can to linkid betwen two var to run some arthmetic
10th Feb 2019, 11:45 AM
@4_4mh
@4_4mh - avatar
0
ok thanks
10th Feb 2019, 12:45 PM
@4_4mh
@4_4mh - avatar