Advertisement
M0Hk

Teaching materials

Sep 17th, 2023
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 KB | Software | 0 0
  1. using System;
  2. using System.Diagnostics.Metrics;
  3.  
  4. namespace firstLesson
  5. {
  6.     internal class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             int packagesOfPens = int.Parse(Console.ReadLine());
  11.             int packetsOfMarkers = int.Parse(Console.ReadLine());
  12.             int litersOfBoardCleaner = int.Parse(Console.ReadLine());
  13.             int discount = int.Parse(Console.ReadLine());
  14.  
  15.             double pensPrice = 5.80 * packagesOfPens;
  16.             double markersPrice = 7.20 * packetsOfMarkers;
  17.             double boarderCleanerPrice = 1.20 * litersOfBoardCleaner;
  18.             double priceOfAll = pensPrice + markersPrice + boarderCleanerPrice;
  19.             double discountAmount = priceOfAll * discount / 100;
  20.             double neededMoney = priceOfAll - discountAmount;
  21.  
  22.             Console.WriteLine(neededMoney);
  23.            
  24.  
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement