Advertisement
IvanBorisovG

Photo Pictures

Sep 4th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.39 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace PhotoPictures
  8. {
  9.     class PhotoPictures
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int picturesCount = int.Parse(Console.ReadLine());
  14.             string picturesType = Console.ReadLine();
  15.             string orderType = Console.ReadLine();
  16.  
  17.             string type1 = "9X13";
  18.             string type2 = "10X15";
  19.             string type3 = "13X18";
  20.             string type4 = "20X30";
  21.             string orderTypeOnline = "online";
  22.             string orderTypeOffice = "office";
  23.  
  24.             double price = 0.0;
  25.  
  26.             if (picturesType == type1 && picturesCount < 50 && orderType == orderTypeOnline)
  27.             {                            
  28.                 price += (picturesCount * 0.16) * 0.98;                          
  29.             }
  30.             else if (picturesType == type1 && picturesCount < 50 && orderType == orderTypeOffice)
  31.             {
  32.                 price += (picturesCount * 0.16);
  33.             }
  34.             else if (picturesType == type1 && picturesCount >= 50 && orderType == orderTypeOnline)
  35.             {                            
  36.                 price += (picturesCount * 0.16) * 0.93;                              
  37.             }
  38.             else if (picturesType == type1 && picturesCount >= 50 && orderType == orderTypeOffice)
  39.             {
  40.                 price += (picturesCount * 0.16) * 0.95;
  41.             }
  42.             else if (picturesType == type2 && picturesCount < 80 && orderType == orderTypeOnline)
  43.             {              
  44.                 price += (picturesCount * 0.16) * 0.98;                          
  45.             }
  46.             else if (picturesType == type2 && picturesCount < 80 && orderType == orderTypeOffice)
  47.             {
  48.                 price += (picturesCount * 0.16);
  49.             }
  50.             else if (picturesType == type2 && picturesCount >= 80 && orderType == orderTypeOnline)
  51.             {              
  52.                 price += (picturesCount * 0.16) * 0.95;              
  53.             }
  54.             else if (picturesType == type2 && picturesCount >= 80 && orderType == orderTypeOffice)
  55.             {
  56.                 price += (picturesCount * 0.16) * 0.97;
  57.             }
  58.             else if (picturesType == type3 && picturesCount >= 50 && picturesCount <= 100 && orderType == orderTypeOnline)
  59.             {                              
  60.                 price += (picturesCount * 0.38) * 0.95;
  61.             }
  62.             else if (picturesType == type3 && picturesCount >= 50 && picturesCount <= 100 && orderType == orderTypeOffice)
  63.             {
  64.                 price += (picturesCount * 0.38) * 0.97;
  65.             }
  66.             else if (picturesType == type3 && picturesCount > 100 && orderType == orderTypeOnline)
  67.             {                            
  68.                 price += (picturesCount * 0.38) * 0.93;          
  69.             }
  70.             else if (picturesType == type3 && picturesCount > 100 && orderType == orderTypeOffice)
  71.             {
  72.                 price += (picturesCount * 0.38) * 0.95;
  73.             }        
  74.             else if (picturesType == type3 && picturesCount < 50 && orderType == orderTypeOnline)
  75.             {
  76.                 price += (picturesCount  * 0.38) * 0.98;
  77.             }
  78.             else if (picturesType == type3 && picturesCount < 50 && orderType == orderTypeOffice)
  79.             {
  80.                 price += (picturesCount * 0.38);
  81.             }          
  82.             else if (picturesType == type4 && picturesCount >= 10 && picturesCount <= 50 && orderType == orderTypeOnline)
  83.             {
  84.                 price += (picturesCount * 2.90) * 0.91;
  85.             }
  86.             else if (picturesType == type4 && picturesCount >= 10 && picturesCount <= 50 && orderType == orderTypeOffice)
  87.             {
  88.                 price += (picturesCount * 2.90) * 0.93;
  89.             }
  90.             else if (picturesType == type4 && picturesCount > 50 && orderType == orderTypeOnline)
  91.             {                              
  92.                 price += (picturesCount * 2.90) * 0.89;  
  93.             }
  94.             else if (picturesType == type4 && picturesCount > 50 && orderType == orderTypeOffice)
  95.             {
  96.                 price += (picturesCount * 2.90) * 0.91;
  97.             }
  98.             Console.WriteLine($"{price:F2}BGN");
  99.         }
  100.     }
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement