Advertisement
denitsas01

Untitled

Mar 23rd, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.84 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 CharityCampaign
  8. {
  9.     class CharityCampaign
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int CampaignDays = int.Parse(Console.ReadLine());
  14.             int Bakers = int.Parse(Console.ReadLine());
  15.             int Cakes = int.Parse(Console.ReadLine());
  16.             int Gofrets = int.Parse(Console.ReadLine());
  17.             int Pancakes = int.Parse(Console.ReadLine());
  18.  
  19.             int CakeSum = Cakes * 45;
  20.             double GofretsSum = Gofrets * 5.80;
  21.             double PancakesSum = Pancakes * 3.20;
  22.  
  23.             double Sum = (CakeSum + GofretsSum + PancakesSum) * Bakers;
  24.             double LeftSum = Sum/0.125;
  25.  
  26.             Console.WriteLine("{0:F2}", LeftSum);
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement