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 _2
- {
- class Program
- {
- static void Main(string[] args)
- {
- var magnoliii = decimal.Parse(Console.ReadLine());
- var zumbuli= decimal.Parse(Console.ReadLine());
- var rozi = decimal.Parse(Console.ReadLine());
- var kaktuzi= decimal.Parse(Console.ReadLine());
- var prizeGift = decimal.Parse(Console.ReadLine());
- var total = (magnoliii * (decimal)3.25 + zumbuli * (decimal)4 + rozi*(decimal)3.5+kaktuzi*(decimal)8)*(decimal)0.95;
- if (total < prizeGift)
- {
- Console.WriteLine("She will have to borrow {0} leva. ", Math.Ceiling(prizeGift - total));
- }
- else
- {
- Console.WriteLine("She is left with {0} leva.", Math.Floor(Math.Abs(total - prizeGift)));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement