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;
- using System.Threading.Tasks;
- namespace POL_LAGR {
- class Program {
- static double L4(double x, double x0, double x1, double x2, double x3, double x4) {
- 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);
- }
- static void Main(string[] args) {
- double x0 = 0.184;
- double x1 = 0.865;
- double x2 = 1.213;
- double x3 = 2.019;
- double x4 = 2.862;
- double x = 0;
- double px = 0;
- Console.Write("Введите x и нажмите Enter: ");
- double px = Convert.ToDouble(Console.ReadLine());
- Console.WriteLine(px);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement