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 CM_1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n, a, b;
- Console.WriteLine("Введите количество точек и границы интерполирования");
- n = Convert.ToInt32(Console.ReadLine());
- a = Convert.ToInt32(Console.ReadLine());
- b = Convert.ToInt32(Console.ReadLine());
- int[] massOfX = new int[n];
- int[] massOfY = new int[n];
- for (int i = 0; i < n; i++)
- {
- massOfX[i] = a + (b - a) * i / n;
- Console.Write(massOfX[i] + " ");
- massOfY[i] = Convert.ToInt32(Math.Pow(massOfX[i], 3) / 2);
- Console.WriteLine(massOfY[i]);
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement