Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace MyApp // Note: actual namespace depends on the project name.
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- string tipeF = Console.ReadLine();
- int flower = int.Parse(Console.ReadLine());
- int money = int.Parse(Console.ReadLine());
- double price = 0;
- double nead = 0;
- if (tipeF == "Roses" && flower > 80)
- {
- price = (flower * 5) * 0.9;
- if (price > money)
- {
- nead = price - money;
- Console.WriteLine($"Not enough money, you need {nead:f2} leva more.");
- }
- else if (price <= money)
- {
- nead = money - price;
- Console.WriteLine($"Hey, you have a great garden with {flower} {tipeF} and {nead:f2} leva left.");
- }
- }
- else if (tipeF == "Roses" && flower <= 80)
- {
- price = flower * 5;
- if (price > money)
- {
- nead = price - money;
- Console.WriteLine($"Not enough money, you need {nead:f2} leva more.");
- }
- else if (price <= money)
- {
- nead = money - price;
- Console.WriteLine($"Hey, you have a great garden with {flower} {tipeF} and {nead:f2} leva left.");
- }
- }
- else if (tipeF == "Dahlias" && flower > 90)
- {
- price = (flower * 3.80) * 0.85;
- if (price > money)
- {
- nead = price - money;
- Console.WriteLine($"Not enough money, you need {nead:f2} leva more.");
- }
- else if (price <= money)
- {
- nead = money - price;
- Console.WriteLine($"Hey, you have a great garden with {flower} {tipeF} and {nead:f2} leva left.");
- }
- }
- else if (tipeF == "Dahlias" && flower <= 90)
- {
- price = flower * 3.80;
- if (price > money)
- {
- nead = price - money;
- Console.WriteLine($"Not enough money, you need {nead:f2} leva more.");
- }
- else if (price <= money)
- {
- nead = money - price;
- Console.WriteLine($"Hey, you have a great garden with {flower} {tipeF} and {nead:f2} leva left.");
- }
- }
- else if (tipeF == "Tulips" && flower > 80)
- {
- price = (flower * 2.80) * 0.85;
- if (price > money)
- {
- nead = price - money;
- Console.WriteLine($"Not enough money, you need {nead:f2} leva more.");
- }
- else if (price <= money)
- {
- nead = money - price;
- Console.WriteLine($"Hey, you have a great garden with {flower} {tipeF} and {nead:f2} leva left.");
- }
- }
- else if (tipeF == "Tulips" && flower <= 80)
- {
- price = flower * 2.80;
- if (price > money)
- {
- nead = price - money;
- Console.WriteLine($"Not enough money, you need {nead:f2} leva more.");
- }
- else if (price <= money)
- {
- nead = money - price;
- Console.WriteLine($"Hey, you have a great garden with {flower} {tipeF} and {nead:f2} leva left.");
- }
- }
- else if (tipeF == "Narcissus" && flower < 120)
- {
- price = (flower * 3) * 1.15;
- if (price > money)
- {
- nead = price - money;
- Console.WriteLine($"Not enough money, you need {nead:f2} leva more.");
- }
- else if (price <= money)
- {
- nead = money - price;
- Console.WriteLine($"Hey, you have a great garden with {flower} {tipeF} and {nead:f2} leva left.");
- }
- }
- else if (tipeF == "Narcissus" && flower >= 120)
- {
- price = flower * 3;
- if (price > money)
- {
- nead = price - money;
- Console.WriteLine($"Not enough money, you need {nead:f2} leva more.");
- }
- else if (price <= money)
- {
- nead = money - price;
- Console.WriteLine($"Hey, you have a great garden with {flower} {tipeF} and {nead:f2} leva left.");
- }
- }
- else if (tipeF == "Gladiolus" && flower < 80)
- {
- price = (flower * 2.5) * 1.20;
- if (price > money)
- {
- nead = price - money;
- Console.WriteLine($"Not enough money, you need {nead:f2} leva more.");
- }
- else if (price <= money)
- {
- nead = money - price;
- Console.WriteLine($"Hey, you have a great garden with {flower} {tipeF} and {nead:f2} leva left.");
- }
- }
- else if (tipeF == "Gladiolus" && flower >= 80)
- {
- price = flower * 2.5;
- if (price > money)
- {
- nead = price - money;
- Console.WriteLine($"Not enough money, you need {nead:f2} leva more.");
- }
- else if (price <= money)
- {
- nead = money - price;
- Console.WriteLine($"Hey, you have a great garden with {flower} {tipeF} and {nead:f2} leva left.");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement