Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 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
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double ivoBudget = double.Parse(Console.ReadLine());
  14. double carParts = Math.Round(double.Parse(Console.ReadLine()));
  15. double oil = double.Parse(Console.ReadLine());
  16. double diodBulbs = Math.Floor(carParts - (carParts * 0.35));
  17. diodBulbs = diodBulbs * 0.20;
  18. carParts = carParts * 0.65;
  19. oil = oil * 2.70;
  20. double all = (diodBulbs + oil + carParts);
  21. double allMinus = ivoBudget - all;
  22. double allPlus = all - ivoBudget;
  23. if (ivoBudget >= all)
  24. {
  25. Console.WriteLine($"You got this, {allMinus:F2} money left!");
  26. }
  27. else if (all > ivoBudget)
  28. {
  29. Console.WriteLine($"Not enough money, you need {allPlus:F2} more!");
  30. }
  31. }
  32. }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement