Advertisement
Niicksana

Christmas Preparation

Jan 2nd, 2018
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.95 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 _1.Christmas_Preparation
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.  
  14.             // Programming Basics Exam - 16 December 2017
  15.  
  16.             int rollsPpaper = int.Parse(Console.ReadLine());
  17.             int rollsTextile = int.Parse(Console.ReadLine());
  18.             double litersGlue = double.Parse(Console.ReadLine());
  19.             int percentage = int.Parse(Console.ReadLine());
  20.  
  21.             double priceRollsPapper = rollsPpaper * 5.80;
  22.             double priceRollsTextile = rollsTextile * 7.20;
  23.             double priceGlue = litersGlue * 1.20;
  24.             double price = priceRollsPapper +
  25.                     priceRollsTextile + priceGlue;
  26.  
  27.             double totalPrice = price - ((price * percentage) / 100);
  28.  
  29.             Console.WriteLine("{0:f3}", totalPrice);
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement