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 Zad1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = 100;
- double x = -5;
- double dx = 10 /(float)n;
- dx *= Math.PI;
- List<double> Wzor = new List<double>();
- List<double> Wzzor = new List<double>();
- List<double> Wzoor = new List<double>();
- List<double> Wzorr = new List<double>();
- for (int i = 0; i <= 100; i++)
- {
- Wzor.Add(Wzor(x));
- x += dx;
- }
- for (int i = 0; i < 1000; i++)
- {
- Wzzor.Add((sin.ElementAt(i + 1) - sin.ElementAt(i)) / dx);
- }
- for (int i = 1; i < 999; i++)
- {
- sinn.Add((cosn.ElementAt(i + 1) - cosn.ElementAt(i - 1)) / 2 * dx);
- blad2.Add(Math.Abs(sin.ElementAt(i) - sinn.ElementAt(i - 1)));
- }
- //Wyswietlanie wyniku
- for (int i = 0; i < 100; i++)
- {
- Console.WriteLine(Wzor.ElementAt(i) + " " + Wzzor.ElementAt(i) + " " + Wzoor.ElementAt(i) + " " + Wzorr.ElementAt(i));
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement