joro_thexfiles

Оборудване за тенис

Apr 9th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.91 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 test_Exam_9_10_March
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double priceTennisRockets = double.Parse(Console.ReadLine());
  14.             int countRockets = int.Parse(Console.ReadLine());
  15.             int countTrainers = int.Parse(Console.ReadLine());
  16.  
  17.             double sumRockets = priceTennisRockets * countRockets;
  18.             double sumTrainers = priceTennisRockets*1/6;
  19.             sumTrainers *= countTrainers;
  20.  
  21.             double total = sumRockets + sumTrainers;
  22.             total *= 1.2;
  23.  
  24.            
  25.  
  26.             Console.WriteLine($"Price to be paid by Djokovic {Math.Floor(total*1/8)}");
  27.             Console.WriteLine($"Price to be paid by sponsors {Math.Ceiling(total*7/8)}");
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.         }
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment