Advertisement
Sim0o0na

Untitled

Apr 16th, 2018
275
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 CherryJars
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double compoteJarsWanted = double.Parse(Console.ReadLine());
  14.             double jamJarsWanted = double.Parse(Console.ReadLine());
  15.  
  16.             double jarsCompote = compoteJarsWanted + 1;
  17.             double jarsJam = jamJarsWanted + 1;
  18.  
  19.             double cherryesCompote = jarsCompote * 0.300;
  20.             double cherryesJam = jarsJam * 0.650;
  21.  
  22.             double cherryC = cherryesCompote + (cherryesCompote * 0.05);
  23.             double cherryJ = cherryesJam + (cherryesJam * 0.1);
  24.  
  25.             double total = (cherryC + cherryJ) * 3.2;
  26.             Console.WriteLine($"{total:f2}");
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement