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 cast_test
- {
- class Program
- {
- static void Main(string[] args)
- {
- double magPrice = int.Parse(Console.ReadLine()) * 3.25;
- int hyacinthPrice = int.Parse(Console.ReadLine()) * 4;
- double rosePrice = int.Parse(Console.ReadLine()) * 3.5;
- int cactPrice = int.Parse(Console.ReadLine()) * 8;
- double neededMoney = double.Parse(Console.ReadLine());
- double profit = (magPrice + rosePrice + hyacinthPrice + cactPrice) * 0.95;
- if (neededMoney <= profit)
- Console.WriteLine("She is left with {0} leva.", Math.Floor(profit - neededMoney));
- else
- Console.WriteLine("She will have to borrow {0} leva.", Math.Ceiling(neededMoney - profit));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement