Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Test
- {
- class Program
- {
- static void Main(string[] args)
- {
- double BMI, masa, wzrost;
- Console.WriteLine("Podaj wagę [kg]: ");
- masa = double.Parse(Console.ReadLine());
- Console.WriteLine("Podaj wzrost [m]: ");
- wzrost = double.Parse(Console.ReadLine());
- BMI = (masa*100.0) / (wzrost*2.0);
- if (BMI > 18.5 && BMI < 25.0)
- {
- Console.WriteLine("Waga prawidłowa");
- }
- else
- {
- if (BMI < 18.5)
- {
- Console.WriteLine("Niedowaga");
- }
- else
- {
- Console.WriteLine("Nadwaga");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement