Advertisement
Guest User

Photo pictures not working C#

a guest
Sep 17th, 2017
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.12 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 Photos
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.  
  14.  
  15.             int countFotos = int.Parse(Console.ReadLine());
  16.             string type = Console.ReadLine();
  17.             string typeOfOrder = Console.ReadLine();
  18.  
  19.             double onePeicePrize = 0;
  20.             double countDiscount = 0;
  21.  
  22.             switch (type)
  23.             {
  24.                 case "9X13":
  25.                     onePeicePrize = 0.16;
  26.                     if (countFotos >= 50)
  27.                     {
  28.                         countDiscount = 0.95;
  29.                     }
  30.                     break;
  31.                 case "10X15":
  32.                     onePeicePrize = 0.16;
  33.                     if (countFotos >= 80)
  34.                     {
  35.                         countDiscount = 0.97;
  36.                     }
  37.                     break;
  38.                 case "13X18":
  39.                     onePeicePrize = 0.38;
  40.                     if (countFotos >= 50 && countFotos <= 100)
  41.                     {
  42.                         countDiscount = 0.97;
  43.                     }
  44.                     else if (countFotos > 100)
  45.                     {
  46.                         countDiscount = 0.95;
  47.                     }
  48.                     break;
  49.                 case "20X30":
  50.                     onePeicePrize = 2.90;
  51.                     if (countFotos >= 10 && countFotos <= 50)
  52.                     {
  53.                         countDiscount = 0.93;
  54.                     }
  55.                     else if (countFotos > 50)
  56.                     {
  57.                         countDiscount = 0.91;
  58.                     }
  59.                     break;
  60.                 default:
  61.                     Console.WriteLine("def");
  62.                     break;
  63.             }
  64.        
  65.                     double sum = countFotos * onePeicePrize * countDiscount;
  66.  
  67.             if (type == "online") sum *= 0.98;
  68.                     Console.WriteLine("{0:f2}BGN", sum);
  69.                     Console.ReadLine();
  70.  
  71.  
  72.         }
  73.         }
  74.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement