Write a program that reads a temperature in Fahrenheit from the input and prints 'High temperature' if the temperature is above 85, 'Low temperature' if it's below 50, and 'Normal temperature' otherwise.
If expression
Categorizing temperature in Fahrenheit
Report a typo
Sample Input 1:
90Sample Output 1:
High temperatureSample Input 2:
40Sample Output 2:
Low temperatureWrite a program in Kotlin
import java.util.*
fun main(args: Array<String>) {
val scan = Scanner(System.`in`)
// input temperature in Fahrenheit
val temperature: Int = scan.nextLine().trim().toInt()
// your code goes here
}
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.