VickSuna

Untitled

Feb 18th, 2020
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _338_Fuel_Tank
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string TypeOfFuel = Console.ReadLine().ToLower();
  10. int tankLevel = int.Parse(Console.ReadLine());
  11.  
  12. if (TypeOfFuel == "diesel" || TypeOfFuel == "gas" || TypeOfFuel == "gasoline")
  13. {
  14. if (tankLevel >= 25)
  15. {
  16. Console.WriteLine($"You have enough {TypeOfFuel}.");
  17. }
  18. else
  19. {
  20. Console.WriteLine($"Fill your tank with {TypeOfFuel}!");
  21. }
  22. }
  23. else
  24. {
  25. Console.WriteLine("Invalid fuel!");
  26.  
  27. }
  28. }
  29. }
  30. }
Add Comment
Please, Sign In to add comment