Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.05 KB | None | 0 0
  1. https://softuni.bg/downloads/svn/programming-basics-v4/course-directories/may-2019/2019-01/Exam/01.%20Tennis%20Equipment.pdf
  2. using System;
  3.  
  4. namespace _01._Tennis_Equipment
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             double priceTS = double.Parse(Console.ReadLine());
  11.             int numTS = int.Parse(Console.ReadLine());
  12.             int numSneakers = int.Parse(Console.ReadLine());
  13.            
  14.             double totalPriceTS = numTS * priceTS;
  15.             double priceSniker = priceTS / 6;
  16.             double totlPriceSnikers = numSneakers * priceSniker;
  17.            
  18.             double TotalPrice = Math.Round((totalPriceTS + totlPriceSnikers) * 1.2);
  19.            
  20.                        
  21.             double priceDjokovic = Math.Floor(TotalPrice / 8);
  22.             double priceSponors = Math.Ceiling(TotalPrice * 7 / 8);
  23.  
  24.             Console.WriteLine($"Price to be paid by Djokovic {priceDjokovic}");
  25.             Console.WriteLine($"Price to be paid by sponsors {priceSponors}");
  26.  
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement