Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please use Kotlin code Objectives: Write a Kotlin code that uses user input then makes a decision to display an output Imagine that you are
please use Kotlin code
Objectives: Write a Kotlin code that uses user input then makes a decision to display an output Imagine that you are a nutritionist, Write a Kotlin code to find out your costumers BMI: 1.Ask the user to input his name 2.Ask the user to input his height in meters 3.Ask the user to input his weight in kilograms 4. Use a function to calculate his BMI using: BMI = weight / (height x height) 5.Then check: - If his BMI is more than 30, then display his name, BMI value and the result: Obesity - Otherwise, if his BMI is more than 25, then display his name, BMI value and the result: Overweight - Otherwise, if his BMI is more than 18, then display his name,BMI value and the result: Normal - Otherwise display then display her name, BMI value and the result: Underweight
Step by Step Solution
★★★★★
3.44 Rating (163 Votes )
There are 3 Steps involved in it
Step: 1
answer fun main printlnWhat is your name val name readLine printlnWhat is your height in meters val ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started