Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace PhotoPictures
- {
- class Program
- {
- static void Main(string[] args)
- {
- int picturesCount = int.Parse(Console.ReadLine());
- string picturesType = Console.ReadLine().ToLower();
- string orderType = Console.ReadLine().ToLower();
- string type1 = "9x13";
- string type2 = "10x15";
- string type3 = "13x18";
- string type4 = "20x30";
- string orderTypeOnline = "online";
- string orderTypeOffice = "office";
- bool elseIfType3 = picturesType == type3 && picturesCount >= 50 && picturesCount <= 100 || picturesCount > 100;
- bool elseIftype4 = picturesType == type4 && picturesCount >= 10 && picturesCount <= 50 || picturesCount > 50;
- double price = 0.0;
- if (picturesType == type1 && picturesCount >= 50)
- {
- price += (picturesCount * 0.16) * 0.95;
- if (orderType == orderTypeOnline)
- {
- price *= 0.98;
- }
- }
- else if (picturesType == type2 && picturesCount >= 80)
- {
- price += (picturesCount * 0.16) * 0.97;
- if (orderType == orderTypeOnline)
- {
- price *= 0.98;
- }
- }
- else if (picturesType == type3 && picturesCount >= 50 && picturesCount <= 100)
- {
- price += (picturesCount * 0.38) * 0.97;
- if (orderType == orderTypeOnline)
- {
- price *= 0.98;
- }
- }
- else if (picturesType == type3 && picturesCount > 100)
- {
- price += (picturesCount * 0.38) * 0.95;
- if (orderType == orderTypeOnline)
- {
- price *= 0.98;
- }
- }
- else if (picturesType == type4 && picturesCount >= 10 && picturesCount <= 50)
- {
- price += (picturesCount * 2.90) * 0.93;
- if (orderType == orderTypeOnline)
- {
- price *= 0.98;
- }
- }
- else if (picturesType == type4 && picturesCount > 50)
- {
- price += (picturesCount * 2.90) * 0.91;
- if (orderType == orderTypeOnline)
- {
- price *= 0.98;
- }
- }
- else
- {
- if (picturesType == type1 || picturesType == type2)
- {
- price += picturesCount * 0.16;
- if (orderType == orderTypeOnline)
- {
- price *= 0.98;
- }
- }
- else if (picturesType == type3)
- {
- price += picturesCount * 0.38;
- if (orderType == orderTypeOnline)
- {
- price *= 0.98;
- }
- }
- else if (picturesType == type4)
- {
- price += picturesCount * 2.90;
- if (orderType == orderTypeOnline)
- {
- price *= 0.98;
- }
- }
- }
- Console.WriteLine($"{price:f2}BGN");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement