Advertisement
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
- {
- class Program
- {
- static void Main(string[] args)
- {
- double ivoBudget = double.Parse(Console.ReadLine());
- double carParts = Math.Round(double.Parse(Console.ReadLine()));
- double oil = double.Parse(Console.ReadLine());
- double diodBulbs = Math.Floor(carParts - (carParts * 0.35));
- diodBulbs = diodBulbs * 0.20;
- carParts = carParts * 0.65;
- oil = oil * 2.70;
- double all = (diodBulbs + oil + carParts);
- double allMinus = ivoBudget - all;
- double allPlus = all - ivoBudget;
- if (ivoBudget >= all)
- {
- Console.WriteLine($"You got this, {allMinus:F2} money left!");
- }
- else if (all > ivoBudget)
- {
- Console.WriteLine($"Not enough money, you need {allPlus:F2} more!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement