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 FlowerShop
- {
- class Program
- {
- static void Main(string[] args)
- {
- int M = int.Parse(Console.ReadLine());
- int Z = int.Parse(Console.ReadLine());
- int R = int.Parse(Console.ReadLine());
- int K = int.Parse(Console.ReadLine());
- double price = double.Parse(Console.ReadLine());
- double pari = M * 3.25 + Z * 4 + R * 3.5 + K * 8;
- pari = pari - (pari * 0.05);
- if (price <= pari)
- {
- Console.WriteLine("She is left with {0} leva.", Math.Floor(pari - price));
- }
- else if (pari < price)
- {
- Console.WriteLine("She will have to borrow {0} leva.", Math.Ceiling(price - pari));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment