Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ktopchiev/3f9b67bc525a39e6c6cc99b4d0240158 to your computer and use it in GitHub Desktop.
Save ktopchiev/3f9b67bc525a39e6c6cc99b4d0240158 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Photo_Pictures
{
class Program
{
static void Main(string[] args)
{
int num = int.Parse(Console.ReadLine());
string kind = Console.ReadLine();
string order = Console.ReadLine();
var price = 1.0;
if (kind == "9X13")
{
price = num * 0.16;
if (num >= 50)
{
price -= price * 0.05;
}
}
else if (kind == "10X15")
{
price = num * 0.16;
if (num >= 80)
{
price -= price * 0.03;
}
}
else if (kind == "13X18")
{
price = num * 0.38;
if (num >= 50 && num <= 100)
{
price -= price * 0.03;
}
else if (num > 100)
{
price -= price * 0.05;
}
}
else if (kind == "20X30")
{
price = num * 2.90;
if (num >= 10 && num <= 50)
{
price -= price * 0.07;
}
else if (num > 50)
{
price -= price * 0.09;
}
}
switch (order)
{
case "online":
price -= price * 0.02;
Console.WriteLine($"{price:F2}BGN");
break;
default:
Console.WriteLine($"{price:F2}BGN");
break;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment