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;
- using System.Threading.Tasks;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- // 1
- int n = Int32.Parse(System.Console.ReadLine());
- string[] x = new string[n+1];
- // 2
- int m = Int32.Parse(System.Console.ReadLine());
- string[] V = new string[m + 1];
- // 3
- string[] U = new string[m + 1];
- // 4
- double[,] E = new double[n + 1, m + 1];
- for (int i = 1; i <= m; i++)
- {
- V[i] = i.ToString();
- U[i] = "Управление " + i.ToString();
- }
- for (int i = 1; i <= n; i++)
- {
- x[i] = "X" + i.ToString();
- }
- double zn;
- for(int i = 1; i <= m; i++)
- {
- zn = 1 / m;
- for (int g = n; g >= 1; g--)
- E[g,i] = zn;
- }
- E[0, 0] = 0;
- using (StreamWriter write3 = File.CreateText("output1.txt"))
- {
- for (int i = 1; i <= m; i++)
- write3.WriteLine("X: " + V[i]);
- }
- using (StreamWriter write1 = File.CreateText("output2.txt"))
- {
- for (int i = 1; i <= m; i++)
- write1.WriteLine("Состояние " + V[i]);
- }
- using (StreamWriter write2 = File.CreateText("output3.txt"))
- {
- for (int i = 1; i <= m; i++)
- write2.WriteLine(U[i]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement