Advertisement
Kenkaster001

HOA1

Aug 15th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace HOA1
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double amount, final_price;
  14. double discount_rate;
  15. Console.Write("Enter amount (Php): ");
  16. amount = int.Parse(Console.ReadLine());
  17. Console.Write("Enter discount rate (%): ");
  18. discount_rate = double.Parse(Console.ReadLine());
  19. final_price = amount - (amount * (discount_rate / 100));
  20. Console.WriteLine("Final Price: Php " + final_price);
  21. Console.WriteLine("-------------------------------------------------------");
  22. double weight, height, bmi;
  23. Console.Write("Enter weight: ");
  24. weight = double.Parse(Console.ReadLine());
  25. Console.Write("Enter height: ");
  26. height = double.Parse(Console.ReadLine());
  27. bmi = (weight * 0.45) / ((height * 0.025) * (height * 0.025));
  28. Console.WriteLine("BMI: " + bmi);
  29. Console.WriteLine("-------------------------------------------------------");
  30. double start, end, sum;
  31. Console.Write("Enter start: ");
  32. start = double.Parse(Console.ReadLine());
  33. Console.Write("Enter end: ");
  34. end = double.Parse(Console.ReadLine());
  35. sum = end * ((start + end) / 2);
  36. Console.WriteLine("Sum: " + sum);
  37. Console.ReadKey();
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement