Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- namespace C
- {
- class Program
- {
- static void Main(string[] args)
- {
- try
- {
- StreamReader f_r = new StreamReader("C:\\users\\read.txt");
- }
- catch
- {
- StreamWriter f_r = new StreamWriter("C:\\users\\read.txt");
- f_r.WriteLine("1,2\n20\n40\n2");
- f_r.Close();
- }
- StreamReader f = new StreamReader("C:\\users\\read.txt");
- double k = Convert.ToDouble(f.ReadLine());
- int xmin = Convert.ToInt32(f.ReadLine());
- int xmax = Convert.ToInt32(f.ReadLine());
- int dx = Convert.ToInt32(f.ReadLine());
- StreamWriter f_w = new StreamWriter("C:\\users\\write.txt", true);
- for(int i = xmin; i <= xmax; i+=dx)
- f_w.WriteLine("({0}):{1:0.00}", i, Math.Pow(1 / Math.Tan(k * i), 1 / 3) + Math.Cos(k * i) / Math.Log(Math.Sin(k * i)));
- f_w.Close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment