Advertisement
AlexJC

Зеленчукова борса

Aug 27th, 2016
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 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 borsa
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double N = double.Parse(Console.ReadLine());
  14. double M = double.Parse(Console.ReadLine());
  15. int zel = int.Parse(Console.ReadLine());
  16. int plo = int.Parse(Console.ReadLine());
  17.  
  18. if (N < 0 || N > 1000)
  19. {
  20. Console.WriteLine("Wrong number");
  21. }
  22. else if (M < 0 || M > 1000)
  23. {
  24. Console.WriteLine("Wrong number");
  25. }
  26. else if (zel < 0 || zel > 1000)
  27. {
  28. Console.WriteLine("Wrong number");
  29. }
  30. else if (plo < 0 || plo > 1000)
  31. {
  32. Console.WriteLine("Wrong number");
  33. }
  34.  
  35.  
  36. var total = N * zel / 1.94 + M * plo / 1.94;
  37. Console.WriteLine(total);
  38.  
  39. }
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement