Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace test_Exam_9_10_March
- {
- class Program
- {
- static void Main(string[] args)
- {
- double priceTennisRockets = double.Parse(Console.ReadLine());
- int countRockets = int.Parse(Console.ReadLine());
- int countTrainers = int.Parse(Console.ReadLine());
- double sumRockets = priceTennisRockets * countRockets;
- double sumTrainers = priceTennisRockets*1/6;
- sumTrainers *= countTrainers;
- double total = sumRockets + sumTrainers;
- total *= 1.2;
- Console.WriteLine($"Price to be paid by Djokovic {Math.Floor(total*1/8)}");
- Console.WriteLine($"Price to be paid by sponsors {Math.Ceiling(total*7/8)}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment