Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 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 CM_1
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n, a, b;
  14. Console.WriteLine("Введите количество точек и границы интерполирования");
  15. n = Convert.ToInt32(Console.ReadLine());
  16. a = Convert.ToInt32(Console.ReadLine());
  17. b = Convert.ToInt32(Console.ReadLine());
  18. int[] massOfX = new int[n];
  19. int[] massOfY = new int[n];
  20. for (int i = 0; i < n; i++)
  21. {
  22. massOfX[i] = a + (b - a) * i / n;
  23. Console.Write(massOfX[i] + " ");
  24. massOfY[i] = Convert.ToInt32(Math.Pow(massOfX[i], 3) / 2);
  25. Console.WriteLine(massOfY[i]);
  26. }
  27. Console.ReadKey();
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement