Browse Source

Release 1.0

master
parent
commit
9c4895a393
  1. BIN
      .vs/comivoyar/v15/.suo
  2. BIN
      .vs/comivoyar/v15/Server/sqlite3/storage.ide
  3. BIN
      1.bmp
  4. 23
      comivoyar/Program.cs
  5. BIN
      comivoyar/bin/Debug/comivoyar.exe
  6. BIN
      comivoyar/bin/Debug/comivoyar.pdb
  7. BIN
      comivoyar/obj/Debug/comivoyar.exe
  8. BIN
      comivoyar/obj/Debug/comivoyar.pdb

BIN
.vs/comivoyar/v15/.suo

Binary file not shown.

BIN
.vs/comivoyar/v15/Server/sqlite3/storage.ide

Binary file not shown.

BIN
1.bmp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

23
comivoyar/Program.cs

@ -1,9 +1,9 @@
using System;
using System.IO;
using System.Diagnostics;
using Combinatorics.Collections;
using System.Collections.Generic;
using static System.Console;
using System.Threading.Tasks;
namespace komvo
{
@ -15,9 +15,19 @@ namespace komvo
List<Point> Points = new List<Point>();
Random random = new Random();
int pCount;
int pCount = 0;
Write("Введите количество точек: ");
pCount = Convert.ToInt32(ReadLine());
Retry:
try
{
pCount = Convert.ToInt32(ReadLine());
}
catch
{
Write("Введите натуральное число: ");
goto Retry;
}
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
@ -44,10 +54,8 @@ namespace komvo
for (int j = 0; j < matr; j++) Write("{0:00.00} ", Matrix[i, j]);
WriteLine();
}
int[] toSwap = new int[Points.Count - 1];
for (int i = 0; i <= toSwap.Length - 1; i++) toSwap[i] = i + 2;
//for (int i = 0; i < toSwap.Length; i++) Write(toSwap[i]); //debug
int index = 0;
double opLength = 0, prevResult = 0;
@ -78,10 +86,11 @@ namespace komvo
stopwatch.Stop();
Write("Ещё раз? (y/n)");
char answer = Convert.ToChar(ReadLine());
char answer = ReadKey().KeyChar;
if (answer == 'y')
{
Points.Clear();
WriteLine("\n");
goto Beginig;
}
}
@ -93,8 +102,6 @@ namespace komvo
for (int j = 0; j < index.Length - 1; j++)
{
string dg = index[j];
int db = int.Parse(index[j]) - 2; //debug
if (j == 0) result += mtr[0, int.Parse(index[j]) - 1];
else if (j == index.Length - 1)
{

BIN
comivoyar/bin/Debug/comivoyar.exe

Binary file not shown.

BIN
comivoyar/bin/Debug/comivoyar.pdb

Binary file not shown.

BIN
comivoyar/obj/Debug/comivoyar.exe

Binary file not shown.

BIN
comivoyar/obj/Debug/comivoyar.pdb

Binary file not shown.
Loading…
Cancel
Save