0
Problem in switch statement how to assign a value to the variable
4 ответов
+ 2
There were a lot of minor errors.
▪ There is no variable 'l' declared but you have used it.
▪ It should be 'Math' and not 'Maths'.
▪ You have misspelled println in case 'h'.
▪ All the case should be replaced with strings.
▪ Also Math.sqrt() returns a double so you must type cast it to (int).
Give input as-
10
20
Area
Here is your modified code.
https://code.sololearn.com/cCK6usSj1L16/?ref=app
+ 4
You forget to write colon in case it should be
case i:
And your variable l are undecleared and some other errors try to fix one by one
+ 1
Thankyou very much friends
0
But we could also change the data type of f to double