Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace FlowerShop
- {
- class Program
- {
- static void Main()
- {
- 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 gift = double.Parse(Console.ReadLine());
- double sum = (m * 3.25 + z * 4 + r * 3.5 + k * 8) * 0.95;
- if (sum >= gift)
- {
- Console.WriteLine($"She is left with {Math.Floor(sum - gift)} leva.");
- }
- else
- {
- Console.WriteLine($"She will have to borrow {Math.Ceiling(gift - sum)} leva.");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment