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