-
Notifications
You must be signed in to change notification settings - Fork 3
/
Main.kt
42 lines (41 loc) · 1.42 KB
/
Main.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
fun multiply(a: Int, b: Int): Int {
return a * b
}
fun main(args: Array<String>) {
println("Welcome to Calculator Apps!")
println("Please select the number of menu to use this calculator Apps!")
println("1. Multiply Operation")
println("2. Division Operation")
println("3. Plus Operation")
println("4. Minus Operation")
println("5. Close Application")
var operation = readLine()
while (operation != "5") {
print("Input first number : ")
var first = readLine()
print("Input second number : ")
var second = readLine()
when (operation) {
"1" -> {
// print first and second number and call the function
}
"2" -> {
// print first and second number and call the function
}
"3" -> {
// print first and second number and call the function
}
else -> {
// print first and second number and call the function
}
}
println("Want to calculate again ? Please select the number of menu to use this calculator Apps!")
println("1. Multiply Operation")
println("2. Division Operation")
println("3. Plus Operation")
println("4. Minus Operation")
println("5. Close Application")
operation = readLine()
}
println("Thank you for using this calculator Apps")
}