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 ConsoleApplication11
- {
- class Program
- {
- static void Main(string[] args)
- {
- double biudjet = double.Parse(Console.ReadLine());
- int statisti = int.Parse(Console.ReadLine());
- double cenaDreha = double.Parse(Console.ReadLine());
- double cenaDekor = biudjet * 0.1;
- double cenaDrehi = statisti * cenaDreha;
- double otstypka = cenaDrehi * 0.1;
- double chistoNad150 = biudjet - cenaDrehi - cenaDekor + otstypka;
- double chistoPod150 = biudjet - cenaDrehi - cenaDekor;
- if (statisti > 150)
- {
- if (chistoNad150>0)
- {
- Console.WriteLine("Action!");
- Console.WriteLine("Wingard starts filming with {0:f2} leva left.",chistoNad150);
- }
- else
- {
- Console.WriteLine("Not enough money!");
- Console.WriteLine("Wingard needs {0:f2} leva more.", Math.Abs(chistoNad150));
- }
- }
- else
- {
- if (chistoPod150 > 0)
- {
- Console.WriteLine("Action!");
- Console.WriteLine("Wingard starts filming with {0:f2} leva left.", chistoPod150);
- }
- else
- {
- Console.WriteLine("Not enough money!");
- Console.WriteLine("Wingard needs {0:f2} leva more.", Math.Abs(chistoPod150));
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement