ellapt

MathExpression

Dec 18th, 2012
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. using System;
  2. using System.Threading;
  3. using System.Globalization;
  4.  
  5. class MathExpression
  6. {
  7. static void Main()
  8. {
  9. Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
  10.  
  11. string nString = Console.ReadLine();
  12. decimal n = decimal.Parse(nString);
  13.  
  14. string mString = Console.ReadLine();
  15. decimal m = decimal.Parse(mString);
  16.  
  17. string pString = Console.ReadLine();
  18. decimal p = decimal.Parse(pString);
  19.  
  20. decimal result = (n * n + (1 / (m * p)) + 1337) / (n - 128.523123123M * p) + (decimal)Math.Sin((int)m % 180);
  21.  
  22. Console.WriteLine("{0:0.000000}", result);
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment