Advertisement
dragonbs

SuppliesForSchool

Sep 15th, 2022
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.80 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _05.SuppliesForSchool
  4. {
  5.     internal class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int numberOfPens = int.Parse(Console.ReadLine());
  10.             int numberOfMarkers = int.Parse(Console.ReadLine());
  11.             int preparatLiters = int.Parse(Console.ReadLine());
  12.             int percent = int.Parse(Console.ReadLine());
  13.  
  14.             double priceForPens = numberOfPens * 5.80;
  15.             double priceForMarkers = numberOfMarkers * 7.20;
  16.             double priceForPreparat = preparatLiters * 1.20;
  17.  
  18.             double sumForProducts = priceForMarkers + priceForPreparat + priceForPens;
  19.             double endPercent = sumForProducts - (sumForProducts * percent / 100);
  20.  
  21.             Console.WriteLine(endPercent);
  22.         }
  23.     }
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement