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