Advertisement
TeMePyT

Untitled

Feb 4th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 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 Ivanovi_s_Family
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double budget = double.Parse(Console.ReadLine());
  14. double firstGiftPrice = double.Parse(Console.ReadLine());
  15. double secondGiftPrice = double.Parse(Console.ReadLine());
  16. double thirdGiftPrice = double.Parse(Console.ReadLine());
  17.  
  18. double totalPrice = firstGiftPrice + secondGiftPrice + thirdGiftPrice;
  19. double moneyLeft = budget - totalPrice;
  20.  
  21. double taxedChange = moneyLeft - moneyLeft*0.1;
  22.  
  23.  
  24. Console.WriteLine($"{taxedChange:F2}");
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement