Advertisement
Dimo1985

Untitled

Oct 21st, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.74 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication11
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double biudjet = double.Parse(Console.ReadLine());
  14.             int statisti = int.Parse(Console.ReadLine());
  15.             double cenaDreha = double.Parse(Console.ReadLine());
  16.  
  17.             double cenaDekor = biudjet * 0.1;
  18.             double cenaDrehi = statisti * cenaDreha;
  19.             double otstypka = cenaDrehi * 0.1;
  20.  
  21.             double chistoNad150 = biudjet - cenaDrehi - cenaDekor + otstypka;
  22.             double chistoPod150 = biudjet - cenaDrehi - cenaDekor;
  23.  
  24.             if (statisti > 150)
  25.                 {                
  26.                 if (chistoNad150>0)
  27.                 {
  28.                     Console.WriteLine("Action!");
  29.                     Console.WriteLine("Wingard starts filming with {0:f2} leva left.",chistoNad150);
  30.                 }
  31.                 else
  32.                 {
  33.                     Console.WriteLine("Not enough money!");
  34.                     Console.WriteLine("Wingard needs {0:f2} leva more.", Math.Abs(chistoNad150));
  35.                 }
  36.             }
  37.             else
  38.             {
  39.                 if (chistoPod150 > 0)
  40.                 {
  41.                     Console.WriteLine("Action!");
  42.                     Console.WriteLine("Wingard starts filming with {0:f2} leva left.", chistoPod150);
  43.                 }
  44.                 else
  45.                 {
  46.                     Console.WriteLine("Not enough money!");
  47.                     Console.WriteLine("Wingard needs {0:f2} leva more.", Math.Abs(chistoPod150));
  48.                 }
  49.             }
  50.         }
  51.     }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement