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 exsellent
- {
- class Program
- {
- static void Main(string[] args)
- {
- double vacationPrice = double.Parse(Console.ReadLine());
- double puzzels = double.Parse(Console.ReadLine());
- double dolls = double.Parse(Console.ReadLine());
- double teddyBears = double.Parse(Console.ReadLine());
- double minions = double.Parse(Console.ReadLine());
- double trucks = double.Parse(Console.ReadLine());
- double amount = puzzels + dolls + teddyBears + minions + trucks;
- double amountPrice = puzzels * 2.60 + dolls * 3 + teddyBears * 4.10 + minions * 8.20 + trucks * 2;
- if(amount>=50)
- {
- amountPrice =amountPrice-(amountPrice* 0.25);
- }
- double total = amountPrice - (amountPrice * 0.10);
- if(total>=vacationPrice)
- {
- Console.WriteLine("Yes! {0:F2} lv left.",total-vacationPrice);
- }
- else
- {
- Console.WriteLine("Not enough money! {0:F2} lv needed.",vacationPrice-total);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment