Advertisement
spasnikolov131

Untitled

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