SHARE
TWEET

06. Charity Campaign

a guest Apr 20th, 2019 114 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace ConsoleApp1
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int numberOfDays = int.Parse(Console.ReadLine());
  10.             int numberofBakers = int.Parse(Console.ReadLine());
  11.             int numberofCakes = int.Parse(Console.ReadLine());
  12.             int numberofWaffles = int.Parse(Console.ReadLine());
  13.             int numberofPancakes = int.Parse(Console.ReadLine());
  14.  
  15.             double productionofCakes = numberOfDays * numberofBakers * numberofCakes * 45;
  16.             double productionofWaffles = numberOfDays * numberofBakers * numberofWaffles * 5.80;
  17.             double productionofPancakes = numberOfDays * numberofBakers * numberofPancakes * 3.20;
  18.  
  19.             double productionAll = productionofCakes + productionofWaffles + productionofPancakes;
  20.             double moneySaved = 0.875 * productionAll;
  21.  
  22.             Console.WriteLine($"{ moneySaved:F2}");
  23.  
  24.  
  25.  
  26.  
  27.         }
  28.     }
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top