Created
November 26, 2015 09:10
-
-
Save Sprite105/7d8660f462116862f861 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace ConsoleApplication6 | |
{ | |
public class Class1 { | |
int[,] mas = { {1,1,1,1,1}, | |
{0,1,1,1,1}, | |
{1,1,1,1,1}, | |
{0,0,0,1,0}, | |
{0,0,0,0,1} }; | |
public void sv() { | |
int count = 0; | |
for (int i = 0; i < 5; i++) | |
{ | |
for (int j = 0; j < 5; j++) | |
if (mas[i, j] == 1) count++; | |
if (count == 5) Console.WriteLine("Граф связной !\n"); count = 0; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment