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.IO;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- StreamWriter sr = new StreamWriter("TestFile.txt");
- double x1 = 0;
- double x2 = 69;
- double n = 44;
- Console.WriteLine("Ограничение для b: b <> 10 или -10");
- Console.WriteLine("Ограничение для c: c <> ((c<-9) & (c>-5))");
- Console.Write("b=");
- double b = Convert.ToDouble(Console.ReadLine());
- Console.Write("c=");
- double c = Convert.ToDouble(Console.ReadLine());
- double sh = (x2 - x1) / n;
- double f;
- double t;
- double k;
- double s;
- double x = x1;
- if (b == 10 || b == -10)
- {
- Console.WriteLine("Ошибка");
- sr.Close();
- }
- else
- if ((c > -9) & (c < -5))
- {
- Console.WriteLine("Ошибка");
- }
- else
- for (int _i = 0; _i < n; _i++)
- {
- f = 100 / (b * b - 100);
- k = Math.Sqrt((c + 9) * (c + 5));
- t = Math.Sin(4 * x / k);
- s = f * t;
- x = x + sh;
- sr.WriteLine(s);
- }
- sr.Close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement