please use Kotlin code Objectives: Write a Kotlin code that uses user input then makes a decision
Fantastic news! We've Found the answer you've been seeking!
Question:
please use Kotlin code
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
answer fun main printlnWhat is your name val name readLine printlnWhat is your height in meters val ... View the full answer
Related Book For
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall
Posted Date:
Students also viewed these programming questions
-
Please Identify relevant ethical issues presented by consulting AICPA Code of Professional Conduct. In your memo response, please site specific sections from the Code of Conduct that you used to...
-
Use the Current Internal Revenue Code in the IntelliConnect Federal Tax database to answer the following questions: a. Which Code sections result from a search for tackle box in the current Code? b....
-
Please write a C Code for this problem. Please do not submit C++ or Python Code.
-
Marcus is the HR manager for United Airlines, an Illinois-based company. One of his employees has recently become disabled and is unable to fulfill the essential functions of his current position,...
-
1. Where do ecomagination and healthymagination fit on the core competence market matrix for GE? (Exhibit) 2. Take either the energy or health care industry and draw the industry value chain. What...
-
W. Hope's year ended on 30 June 2015. Write up the ledger accounts, showing the transfers to the financial statements and the balances carried down to the next year for the following: (a) Stationery:...
-
What is a compilation unit?
-
An adult takes about 12 breaths per minute inhaling roughly 500mL of air with each breath. The molar compositions of the inspired and expired gases are as follows: The inspired gas is at 24?C and 1...
-
8. Draw and label a potential graph and contour plot for: a. A point charge of 1nC. b. A parallel-plate capacitor with AV = 2.0V 9. The electric potential generated by a particular point charge is...
-
The Teachers' Retirement System of a midwestern state is selling a bond investment from its portfolio to generate cash to make payments to retirees for the coming year It plans to sell $100 million...
-
A 50.0 mL solution of 0.15 M HCI was used to dissolve a 1.45 g of antacid tablet. The 2.09 excess HCl was then )titrated with 22.0 mL of 0.095 NaOH solution. If the active ingredient in the tablet is...
-
In July 2016, ABC Rural reported that a more environmentally friendly and less costly water-jet technology is being developed to compete with hydraulic fracturing in which water, sand, and chemicals...
-
A system's transfer function is given as \[\frac{Y(s)}{U(s)}=\frac{s^{2}(2 s+1)}{\frac{1}{3} s^{3}+s^{2}+s+2}\] a. Find the state-space form. b. Find the transfer function from (a).
-
The inverse market demand curve for a final good is \(P=50-Q\) and the marginal cost of supplying labor is \(M C_{L}=20\). Each unit of output requires half a unit of labor, \(L\), and no other...
-
How does a monopoly's demand for labor change if a second firm enters its output market and the result is a Stackelberg duopoly equilibrium, where the former monopoly becomes the Stackelberg leader?...
-
The inverse market demand curve for a final good is \(P=50-Q\) and the wage rate is \(w=20\). Each unit of output requires half a unit of labor, \(L\), and no other factor, \(Q=2 L\). If factor and...
-
My cousin Robert wants to have $10,000 per year as a retirement supplement for 20 years (from age 65 to 85). He is now 40 years old. How much must he save each year for the next 25 years if he...
-
A. Select a recent issue (paper or online) of Report on Business Magazine, Canadian Business Magazine (online only), Bloomberg Businessweek, Fast Company, The Economist, or another business magazine....
-
What are seven essential items that the analyst should include in performing a Web site traffic analysis?
-
Every time we get consultants in here, they pass out some goofy questionnaire that has no meaning to us at all. Why dont they bother to personalize it, at least a little? asks Ray Dient, head of...
-
What does a process represent on a context-level data flow diagram?
-
Your friend Travis claims to have set the new world speed record for riding a unicycle. His top speed, he says, was 55 m/s. Do you believe him? Explain.
-
Mark and Sofia walk together down a long, straight road. They walk without stopping for 4 miles. At this point Sofia says their displacement during the trip must have been 4 miles; Mark says their...
-
Luis is visiting a public garden that has a large, circular path. When he has walked one-quarter of the distance around the path, the magnitude of his displacement is 180 m. What is the diameter of...
Study smarter with the SolutionInn App