Advertisement
petromaxa

Untitled

Dec 11th, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace _1.Problem_MathExpression
  7. {
  8. class Program
  9. {
  10. static void Main()
  11. {
  12. decimal N, M, P;
  13. decimal minInput=-10000000;
  14. decimal maxInput=10000000;
  15. decimal result;
  16.  
  17. N = decimal.Parse(Console.ReadLine());
  18. M = decimal.Parse(Console.ReadLine());
  19. P = decimal.Parse(Console.ReadLine());
  20. if (N >= minInput && N <= maxInput && M >= minInput && M != 0 && M <= maxInput && P >= minInput && P != 0 && P <= maxInput)
  21. {
  22.  
  23. result = (((N*N) + (1 / (M * P)) + 1337) / (N - (128.523123123M * P))) + (decimal)Math.Sin((double)((int)(M % 180)));
  24. Console.WriteLine("{0:0.000000}",result);
  25. }
  26. else
  27. {
  28. Console.WriteLine("Wrong entry!");
  29. }
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement