Anzzhhela98

dd

May 18th, 2020
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.01 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Gasoline
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string name = Console.ReadLine();
  10.             string writeName = "Gas";
  11.              string writesecondName = "Gasoline";
  12.             string writethirdName = "Diesel";
  13.             int literGas = int.Parse(Console.ReadLine());
  14.  
  15.             if (literGas >=25)
  16.             {
  17.                 Console.WriteLine($"You have enough {(name)}!");
  18.             }
  19.             else if (literGas < 25)
  20.             {
  21.                 Console.WriteLine($"Fill your thank with {(name)}!");
  22.  
  23.             }
  24.             else if (name != writeName )
  25.             {
  26.                 Console.WriteLine("Invail Fuel!");
  27.             }
  28.             else if (name != writesecondName)
  29.             {
  30.                 Console.WriteLine("Invail Fuel!");
  31.             }
  32.             else if ( name != writethirdName)
  33.             {
  34.                 Console.WriteLine("Invail Fuel!");
  35.             }
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment