Advertisement
hawzze

charityCampaign_SoftUni

Jul 11th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1. using System;
  2.  
  3. namespace softuni1
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             //input
  10.             int days = int.Parse(Console.ReadLine());
  11.             int chefs = int.Parse(Console.ReadLine());
  12.             int cakes = int.Parse(Console.ReadLine());
  13.             int waffles = int.Parse(Console.ReadLine());
  14.             int pancakes = int.Parse(Console.ReadLine());
  15.             //calculation
  16.             int cakesSum = cakes * 45;
  17.             double wafflesSum = waffles * 5.80;
  18.             double pancakesSum = pancakes * 3.20;
  19.  
  20.             double sumForOneDay = (cakesSum + wafflesSum + pancakesSum) * chefs;
  21.             double company = sumForOneDay * days;
  22.             double total = company - (company / 8);
  23.             Console.WriteLine(total);
  24.  
  25.  
  26.  
  27.         }
  28.  
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement