In this c# program please fix the height and inches, for example "Enter your Height in feet followed by a space then additional inches: 5 4" Source Code: using System; namespace BMI { internal class Program { static void Main(string[] args) { float bmi, m, h; String name; Console.Write("Enter the student name: "); name = Console.ReadLine(); Console.Write("\nEnter the grade level(1-6): "); h = float.Parse(Console.ReadLine()); Console.Write("\nEnter the student Weight(kg): "); m = float.Parse(Console.ReadLine()); bmi = m / (h * h); Console.WriteLine("\nStudent BMI is: " + bmi); if(bmi < 18.5) { Console.WriteLine("\nStudent is Underweight"); } else if(bmi >= 18.5 && bmi < 25) { Console.WriteLine("\nStudent is Normal Weight"); } else if(bmi >= 25 && bmi < 30) { Console.WriteLine("\nStudent is Overweight"); } else { Console.WriteLine("\nStudent is Obese"); } } } } Thank you!
In this c#
Source Code:
using System;
namespace BMI
{
internal class Program
{
static void Main(string[] args)
{
float bmi, m, h;
String name;
Console.Write("Enter the student name: ");
name = Console.ReadLine();
Console.Write("\nEnter the grade level(1-6): ");
h = float.Parse(Console.ReadLine());
Console.Write("\nEnter the student Weight(kg): ");
m = float.Parse(Console.ReadLine());
bmi = m / (h * h);
Console.WriteLine("\nStudent BMI is: " + bmi);
if(bmi < 18.5)
{
Console.WriteLine("\nStudent is Underweight");
}
else if(bmi >= 18.5 && bmi < 25)
{
Console.WriteLine("\nStudent is Normal Weight");
}
else if(bmi >= 25 && bmi < 30)
{
Console.WriteLine("\nStudent is Overweight");
}
else
{
Console.WriteLine("\nStudent is Obese");
}
}
}
}
Thank you!
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)