Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace POL_LAGR {
  8. class Program {
  9.  
  10.  
  11. static double L4(double x, double x0, double x1, double x2, double x3, double x4) {
  12. return -0.4899*(x - x1)*(x - x2)*(x - x3)*(x - x4) - 4.6544*(x - x0)*(x - x2)*(x - x3)*(x - x4) - 10.6778*(x - x0)*(x - x1)*(x - x3)*(x - x4) + 4.8942*(x - x0)*(x - x1)*(x - x2)*(x - x4) - 1.1484*(x - x0)*(x - 1)*(x - 2)*(x - x3);
  13. }
  14.  
  15. static void Main(string[] args) {
  16.  
  17.  
  18. double x0 = 0.184;
  19. double x1 = 0.865;
  20. double x2 = 1.213;
  21. double x3 = 2.019;
  22. double x4 = 2.862;
  23. double x = 0;
  24. double px = 0;
  25. Console.Write("Введите x и нажмите Enter: ");
  26. double px = Convert.ToDouble(Console.ReadLine());
  27. Console.WriteLine(px);
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. Console.ReadKey();
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement