Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace _1.Problem_MathExpression
- {
- class Program
- {
- static void Main()
- {
- decimal N, M, P;
- decimal minInput=-10000000;
- decimal maxInput=10000000;
- decimal result;
- N = decimal.Parse(Console.ReadLine());
- M = decimal.Parse(Console.ReadLine());
- P = decimal.Parse(Console.ReadLine());
- if (N >= minInput && N <= maxInput && M >= minInput && M != 0 && M <= maxInput && P >= minInput && P != 0 && P <= maxInput)
- {
- result = (((N*N) + (1 / (M * P)) + 1337) / (N - (128.523123123M * P))) + (decimal)Math.Sin((double)((int)(M % 180)));
- Console.WriteLine("{0:0.000000}",result);
- }
- else
- {
- Console.WriteLine("Wrong entry!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement