Advertisement
Asinka

01. MathExpression (TestExam)

Dec 26th, 2012
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. using System;
  2. using System.Globalization;
  3.  
  4.  
  5. class Program
  6. {
  7.     static void Main()
  8.     {
  9.         decimal n = decimal.Parse(Console.ReadLine(), CultureInfo.InvariantCulture);
  10.         decimal m = decimal.Parse(Console.ReadLine(), CultureInfo.InvariantCulture);
  11.         decimal p = decimal.Parse(Console.ReadLine(), CultureInfo.InvariantCulture);
  12.        
  13.         decimal result = 0;
  14.         int mod = (int)(m % 180);
  15.  
  16.         result = (n * n + 1 / (m * p) + 1337) / (n - (decimal)128.523123123 * p) + (decimal)Math.Sin(mod);
  17.  
  18.         Console.WriteLine("{0:F6}", result);
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement