Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Fuel_Tank
- {
- class Program
- {
- static void Main(string[] args)
- {
- string fuel = Console.ReadLine().ToLower();
- int liters = int.Parse(Console.ReadLine());
- if (liters >= 25)
- {
- if (fuel == "Diesel" || fuel == "Gasoline" || fuel == "Gas")
- {
- Console.WriteLine($"You have enough {fuel}.");
- }
- }
- else if(liters < 25)
- {
- Console.WriteLine($"Fill your tank with {fuel}!");
- }
- else
- {
- Console.WriteLine("Invalid fuel!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement