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