4DM3M

23

Jan 3rd, 2022
1,077
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Drafty
  4. {
  5.     class Program
  6.     {
  7.         static double Method(double x, double y)
  8.         {
  9.             return 3 * Math.Sin(x) + 2 * Math.Cos(y);
  10.         }
  11.        
  12.         static void Main(string[] args)
  13.         {
  14.             Console.Write("Введите x: ");
  15.             double x = double.Parse(Console.ReadLine());
  16.  
  17.             Console.Write("Введите y: ");
  18.             double y = double.Parse(Console.ReadLine());
  19.  
  20.             Console.WriteLine("Результат: " + Method(x, y));
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment