Created
November 29, 2017 21:40
-
-
Save ktopchiev/3f9b67bc525a39e6c6cc99b4d0240158 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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