Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace _2_zadacha
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. double pricepit = double.Parse(Console.ReadLine());
  13. int colpit = int.Parse(Console.ReadLine());
  14. int colkoz = int.Parse(Console.ReadLine());
  15. int colgev = int.Parse(Console.ReadLine());
  16. int colcor = int.Parse(Console.ReadLine());
  17. double budget = double.Parse(Console.ReadLine());
  18. double allprice = (pricepit * colpit) + ((1.2 * pricepit) * colkoz) + ((0.72 * pricepit) * colgev) + ((0.72 * pricepit + 1.2) * colcor);
  19. if (budget >= allprice)
  20. Console.WriteLine("Yes! {0:.##} leva left.", budget - allprice);
  21. else
  22. Console.WriteLine("No! {0:.##} leva need.", allprice - budget);
  23.  
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement