Warning! It seems that you are using Dodona within another webpage, so not everything may work properly. Let your teacher know so that he can solve the problem by adjusting a setting in the learning environment. In the meantime, you can click this link to open Dodona in a new window.
Warning! The page was not fully loaded, probably because of a network issue. It could be that not all functionalities work as expected. Please try reloading the page.
Csharp exercise
H7 Methoden - Testen - BMI calculator
Sign in to hand in your solution and get feedback.
using System;
namespace BMICalculator
{
public class Program
{
public static void Main(string[] args)
{
//JE MAG DE CODE IN DE MAIN METHODE NIET AANPASSEN
Console.WriteLine("=== BMI Calculator ===");
Console.WriteLine("Geef je gewicht in kg:");
double gewicht = double.Parse(Console.ReadLine());
Console.WriteLine("Geef je lengte in meter (bijv. 1.75):");
double lengte = double.Parse(Console.ReadLine());
double bmi = BerekenBMI(gewicht, lengte);
string categorie = GeefBMICategorie(bmi);
Console.WriteLine($"\nJe BMI: {bmi}");
Console.WriteLine($"Categorie: {categorie}");
}
// Schrijf hier je methode BerekenBMI
// Schrijf hier je methode GeefBMICategorie
}
}