{"action":"created","comment":{"url":"https://api.github.com/repos/MichailOsipov/Task02/pulls/comments/55020483","id":55020483,"diff_hunk":"@@ -0,0 +1,106 @@\n+﻿using System;\n+using System.Collections.Generic;\n+using System.Linq;\n+using System.Text;\n+using System.Threading.Tasks;\n+\n+namespace Cycle_array\n+{\n+    class Program\n+    {\n+        public static int FindMaxElement(int[,] array, int n, int m)\n+        {\n+            int temp = array[0, 0];\n+\n+            for (int i = 0; i < n; i++)\n+                for (int j = 0; j < m; j++)\n+                    if (array[i, j] > temp)\n+                        temp = array[i, j];\n+\n+            return temp;\n+        }\n+        public static int FindMinElement(int[,] array, int n, int m)\n+        {\n+            int temp = array[0, 0];\n+\n+            for (int i = 0; i < n; i++)\n+                for (int j = 0; j < m; j++)\n+                    if (array[i, j] < temp)\n+                        temp = array[i, j];\n+\n+            return temp;\n+        }\n+        public static void ChangeMin_and_Max(int[,] array, int n, int m)\n+        {\n+            int min = array[0, 0], max = array[0, 0];\n+            int n1 = 0, m1 = 0, n2 = 0, m2 = 0;\n+            int temp;\n+\n+            for (int i = 0; i < n; i++)\n+                for (int j = 0; j < m; j++)\n+                {\n+                    if (array[i, j] < min)\n+                    {\n+                        min = array[i, j];\n+                        n1 = i;\n+                        m1 = j;\n+                    }\n+                    if (array[i, j] > max)\n+                    {\n+                        max = array[i, j];\n+                        n2 = i;\n+                        m2 = j;\n+                    }\n+                }\n+            temp = array[n1, m1];\n+            array[n1, m1] = array[n2, m2];\n+            array[n2, m2] = temp;\n+        }\n+        static void Main(string[] args)\n+        {\n+            int n, m;\n+\n+            Console.WriteLine(\"Enter Data:\");\n+            n = int.Parse(Console.ReadLine());\n+            m = int.Parse(Console.ReadLine());\n+\n+            int[,] array = new int[n, m];\n+\n+            Console.WriteLine(\"Now fill the array:\");\n+\n+            string str;\n+            int temp;\n+\n+            for (int i = 0; i < n; i++)\n+                for (int j = 0; j < m; j++)\n+                {\n+                    str = Console.ReadLine();\n+\n+                    if (Int32.TryParse(str, out temp))\n+                        array[i, j] = temp;\n+                    else\n+                    {\n+                        Console.WriteLine(\"Error!\");\n+                        array[i, j] = 0;//return;\n+                    }\n+                }\n+\n+            Console.WriteLine(\"Your array:\");\n+\n+            for (int i = 0; i < n; i++)\n+                for (int j = 0; j < m; j++)\n+                    Console.WriteLine(array[i, j]);\n+\n+            Console.WriteLine(\"Max: \" + FindMaxElement(array, n, m));\n+            Console.WriteLine(\"Min: \" + FindMinElement(array, n, m));\n+\n+            ChangeMin_and_Max(array, n, m);\n+\n+            for (int i = 0; i < n; i++)\n+                for (int j = 0; j < m; j++)\n+                    Console.WriteLine(array[i, j]);","path":"string/array/Program.cs","position":101,"original_position":101,"commit_id":"d52fdc3fe23b4ed4687c7e7c58c9445274909d5e","original_commit_id":"d52fdc3fe23b4ed4687c7e7c58c9445274909d5e","user":{"login":"EvgenyVermenik","id":17542717,"avatar_url":"https://avatars.githubusercontent.com/u/17542717?v=3","gravatar_id":"","url":"https://api.github.com/users/EvgenyVermenik","html_url":"https://github.com/EvgenyVermenik","followers_url":"https://api.github.com/users/EvgenyVermenik/followers","following_url":"https://api.github.com/users/EvgenyVermenik/following{/other_user}","gists_url":"https://api.github.com/users/EvgenyVermenik/gists{/gist_id}","starred_url":"https://api.github.com/users/EvgenyVermenik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvgenyVermenik/subscriptions","organizations_url":"https://api.github.com/users/EvgenyVermenik/orgs","repos_url":"https://api.github.com/users/EvgenyVermenik/repos","events_url":"https://api.github.com/users/EvgenyVermenik/events{/privacy}","received_events_url":"https://api.github.com/users/EvgenyVermenik/received_events","type":"User","site_admin":false},"body":"Дублирование кода.","created_at":"2016-03-04T11:40:50Z","updated_at":"2016-03-04T11:40:50Z","html_url":"https://github.com/MichailOsipov/Task02/pull/1#discussion_r55020483","pull_request_url":"https://api.github.com/repos/MichailOsipov/Task02/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/MichailOsipov/Task02/pulls/comments/55020483"},"html":{"href":"https://github.com/MichailOsipov/Task02/pull/1#discussion_r55020483"},"pull_request":{"href":"https://api.github.com/repos/MichailOsipov/Task02/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/MichailOsipov/Task02/pulls/1","id":61612639,"html_url":"https://github.com/MichailOsipov/Task02/pull/1","diff_url":"https://github.com/MichailOsipov/Task02/pull/1.diff","patch_url":"https://github.com/MichailOsipov/Task02/pull/1.patch","issue_url":"https://api.github.com/repos/MichailOsipov/Task02/issues/1","number":1,"state":"open","locked":false,"title":"added new projects - string and array","user":{"login":"MichailOsipov","id":9383393,"avatar_url":"https://avatars.githubusercontent.com/u/9383393?v=3","gravatar_id":"","url":"https://api.github.com/users/MichailOsipov","html_url":"https://github.com/MichailOsipov","followers_url":"https://api.github.com/users/MichailOsipov/followers","following_url":"https://api.github.com/users/MichailOsipov/following{/other_user}","gists_url":"https://api.github.com/users/MichailOsipov/gists{/gist_id}","starred_url":"https://api.github.com/users/MichailOsipov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichailOsipov/subscriptions","organizations_url":"https://api.github.com/users/MichailOsipov/orgs","repos_url":"https://api.github.com/users/MichailOsipov/repos","events_url":"https://api.github.com/users/MichailOsipov/events{/privacy}","received_events_url":"https://api.github.com/users/MichailOsipov/received_events","type":"User","site_admin":false},"body":"First i create an empty project. Then i add string and array projects.","created_at":"2016-03-03T19:37:26Z","updated_at":"2016-03-04T11:40:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2264c3ebbe6279be08fa0bc0756a97a9a5ff9884","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MichailOsipov/Task02/pulls/1/commits","review_comments_url":"https://api.github.com/repos/MichailOsipov/Task02/pulls/1/comments","review_comment_url":"https://api.github.com/repos/MichailOsipov/Task02/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MichailOsipov/Task02/issues/1/comments","statuses_url":"https://api.github.com/repos/MichailOsipov/Task02/statuses/d52fdc3fe23b4ed4687c7e7c58c9445274909d5e","head":{"label":"MichailOsipov:task","ref":"task","sha":"d52fdc3fe23b4ed4687c7e7c58c9445274909d5e","user":{"login":"MichailOsipov","id":9383393,"avatar_url":"https://avatars.githubusercontent.com/u/9383393?v=3","gravatar_id":"","url":"https://api.github.com/users/MichailOsipov","html_url":"https://github.com/MichailOsipov","followers_url":"https://api.github.com/users/MichailOsipov/followers","following_url":"https://api.github.com/users/MichailOsipov/following{/other_user}","gists_url":"https://api.github.com/users/MichailOsipov/gists{/gist_id}","starred_url":"https://api.github.com/users/MichailOsipov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichailOsipov/subscriptions","organizations_url":"https://api.github.com/users/MichailOsipov/orgs","repos_url":"https://api.github.com/users/MichailOsipov/repos","events_url":"https://api.github.com/users/MichailOsipov/events{/privacy}","received_events_url":"https://api.github.com/users/MichailOsipov/received_events","type":"User","site_admin":false},"repo":{"id":53076966,"name":"Task02","full_name":"MichailOsipov/Task02","owner":{"login":"MichailOsipov","id":9383393,"avatar_url":"https://avatars.githubusercontent.com/u/9383393?v=3","gravatar_id":"","url":"https://api.github.com/users/MichailOsipov","html_url":"https://github.com/MichailOsipov","followers_url":"https://api.github.com/users/MichailOsipov/followers","following_url":"https://api.github.com/users/MichailOsipov/following{/other_user}","gists_url":"https://api.github.com/users/MichailOsipov/gists{/gist_id}","starred_url":"https://api.github.com/users/MichailOsipov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichailOsipov/subscriptions","organizations_url":"https://api.github.com/users/MichailOsipov/orgs","repos_url":"https://api.github.com/users/MichailOsipov/repos","events_url":"https://api.github.com/users/MichailOsipov/events{/privacy}","received_events_url":"https://api.github.com/users/MichailOsipov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MichailOsipov/Task02","description":"Just Task02","fork":false,"url":"https://api.github.com/repos/MichailOsipov/Task02","forks_url":"https://api.github.com/repos/MichailOsipov/Task02/forks","keys_url":"https://api.github.com/repos/MichailOsipov/Task02/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MichailOsipov/Task02/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MichailOsipov/Task02/teams","hooks_url":"https://api.github.com/repos/MichailOsipov/Task02/hooks","issue_events_url":"https://api.github.com/repos/MichailOsipov/Task02/issues/events{/number}","events_url":"https://api.github.com/repos/MichailOsipov/Task02/events","assignees_url":"https://api.github.com/repos/MichailOsipov/Task02/assignees{/user}","branches_url":"https://api.github.com/repos/MichailOsipov/Task02/branches{/branch}","tags_url":"https://api.github.com/repos/MichailOsipov/Task02/tags","blobs_url":"https://api.github.com/repos/MichailOsipov/Task02/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MichailOsipov/Task02/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MichailOsipov/Task02/git/refs{/sha}","trees_url":"https://api.github.com/repos/MichailOsipov/Task02/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MichailOsipov/Task02/statuses/{sha}","languages_url":"https://api.github.com/repos/MichailOsipov/Task02/languages","stargazers_url":"https://api.github.com/repos/MichailOsipov/Task02/stargazers","contributors_url":"https://api.github.com/repos/MichailOsipov/Task02/contributors","subscribers_url":"https://api.github.com/repos/MichailOsipov/Task02/subscribers","subscription_url":"https://api.github.com/repos/MichailOsipov/Task02/subscription","commits_url":"https://api.github.com/repos/MichailOsipov/Task02/commits{/sha}","git_commits_url":"https://api.github.com/repos/MichailOsipov/Task02/git/commits{/sha}","comments_url":"https://api.github.com/repos/MichailOsipov/Task02/comments{/number}","issue_comment_url":"https://api.github.com/repos/MichailOsipov/Task02/issues/comments{/number}","contents_url":"https://api.github.com/repos/MichailOsipov/Task02/contents/{+path}","compare_url":"https://api.github.com/repos/MichailOsipov/Task02/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MichailOsipov/Task02/merges","archive_url":"https://api.github.com/repos/MichailOsipov/Task02/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MichailOsipov/Task02/downloads","issues_url":"https://api.github.com/repos/MichailOsipov/Task02/issues{/number}","pulls_url":"https://api.github.com/repos/MichailOsipov/Task02/pulls{/number}","milestones_url":"https://api.github.com/repos/MichailOsipov/Task02/milestones{/number}","notifications_url":"https://api.github.com/repos/MichailOsipov/Task02/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MichailOsipov/Task02/labels{/name}","releases_url":"https://api.github.com/repos/MichailOsipov/Task02/releases{/id}","deployments_url":"https://api.github.com/repos/MichailOsipov/Task02/deployments","created_at":"2016-03-03T19:26:14Z","updated_at":"2016-03-03T19:30:33Z","pushed_at":"2016-03-03T19:37:26Z","git_url":"git://github.com/MichailOsipov/Task02.git","ssh_url":"git@github.com:MichailOsipov/Task02.git","clone_url":"https://github.com/MichailOsipov/Task02.git","svn_url":"https://github.com/MichailOsipov/Task02","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"MichailOsipov:master","ref":"master","sha":"605ceb8919836cf28b878e03ce149c51f1ecf5e8","user":{"login":"MichailOsipov","id":9383393,"avatar_url":"https://avatars.githubusercontent.com/u/9383393?v=3","gravatar_id":"","url":"https://api.github.com/users/MichailOsipov","html_url":"https://github.com/MichailOsipov","followers_url":"https://api.github.com/users/MichailOsipov/followers","following_url":"https://api.github.com/users/MichailOsipov/following{/other_user}","gists_url":"https://api.github.com/users/MichailOsipov/gists{/gist_id}","starred_url":"https://api.github.com/users/MichailOsipov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichailOsipov/subscriptions","organizations_url":"https://api.github.com/users/MichailOsipov/orgs","repos_url":"https://api.github.com/users/MichailOsipov/repos","events_url":"https://api.github.com/users/MichailOsipov/events{/privacy}","received_events_url":"https://api.github.com/users/MichailOsipov/received_events","type":"User","site_admin":false},"repo":{"id":53076966,"name":"Task02","full_name":"MichailOsipov/Task02","owner":{"login":"MichailOsipov","id":9383393,"avatar_url":"https://avatars.githubusercontent.com/u/9383393?v=3","gravatar_id":"","url":"https://api.github.com/users/MichailOsipov","html_url":"https://github.com/MichailOsipov","followers_url":"https://api.github.com/users/MichailOsipov/followers","following_url":"https://api.github.com/users/MichailOsipov/following{/other_user}","gists_url":"https://api.github.com/users/MichailOsipov/gists{/gist_id}","starred_url":"https://api.github.com/users/MichailOsipov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichailOsipov/subscriptions","organizations_url":"https://api.github.com/users/MichailOsipov/orgs","repos_url":"https://api.github.com/users/MichailOsipov/repos","events_url":"https://api.github.com/users/MichailOsipov/events{/privacy}","received_events_url":"https://api.github.com/users/MichailOsipov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MichailOsipov/Task02","description":"Just Task02","fork":false,"url":"https://api.github.com/repos/MichailOsipov/Task02","forks_url":"https://api.github.com/repos/MichailOsipov/Task02/forks","keys_url":"https://api.github.com/repos/MichailOsipov/Task02/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MichailOsipov/Task02/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MichailOsipov/Task02/teams","hooks_url":"https://api.github.com/repos/MichailOsipov/Task02/hooks","issue_events_url":"https://api.github.com/repos/MichailOsipov/Task02/issues/events{/number}","events_url":"https://api.github.com/repos/MichailOsipov/Task02/events","assignees_url":"https://api.github.com/repos/MichailOsipov/Task02/assignees{/user}","branches_url":"https://api.github.com/repos/MichailOsipov/Task02/branches{/branch}","tags_url":"https://api.github.com/repos/MichailOsipov/Task02/tags","blobs_url":"https://api.github.com/repos/MichailOsipov/Task02/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MichailOsipov/Task02/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MichailOsipov/Task02/git/refs{/sha}","trees_url":"https://api.github.com/repos/MichailOsipov/Task02/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MichailOsipov/Task02/statuses/{sha}","languages_url":"https://api.github.com/repos/MichailOsipov/Task02/languages","stargazers_url":"https://api.github.com/repos/MichailOsipov/Task02/stargazers","contributors_url":"https://api.github.com/repos/MichailOsipov/Task02/contributors","subscribers_url":"https://api.github.com/repos/MichailOsipov/Task02/subscribers","subscription_url":"https://api.github.com/repos/MichailOsipov/Task02/subscription","commits_url":"https://api.github.com/repos/MichailOsipov/Task02/commits{/sha}","git_commits_url":"https://api.github.com/repos/MichailOsipov/Task02/git/commits{/sha}","comments_url":"https://api.github.com/repos/MichailOsipov/Task02/comments{/number}","issue_comment_url":"https://api.github.com/repos/MichailOsipov/Task02/issues/comments{/number}","contents_url":"https://api.github.com/repos/MichailOsipov/Task02/contents/{+path}","compare_url":"https://api.github.com/repos/MichailOsipov/Task02/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MichailOsipov/Task02/merges","archive_url":"https://api.github.com/repos/MichailOsipov/Task02/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MichailOsipov/Task02/downloads","issues_url":"https://api.github.com/repos/MichailOsipov/Task02/issues{/number}","pulls_url":"https://api.github.com/repos/MichailOsipov/Task02/pulls{/number}","milestones_url":"https://api.github.com/repos/MichailOsipov/Task02/milestones{/number}","notifications_url":"https://api.github.com/repos/MichailOsipov/Task02/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MichailOsipov/Task02/labels{/name}","releases_url":"https://api.github.com/repos/MichailOsipov/Task02/releases{/id}","deployments_url":"https://api.github.com/repos/MichailOsipov/Task02/deployments","created_at":"2016-03-03T19:26:14Z","updated_at":"2016-03-03T19:30:33Z","pushed_at":"2016-03-03T19:37:26Z","git_url":"git://github.com/MichailOsipov/Task02.git","ssh_url":"git@github.com:MichailOsipov/Task02.git","clone_url":"https://github.com/MichailOsipov/Task02.git","svn_url":"https://github.com/MichailOsipov/Task02","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MichailOsipov/Task02/pulls/1"},"html":{"href":"https://github.com/MichailOsipov/Task02/pull/1"},"issue":{"href":"https://api.github.com/repos/MichailOsipov/Task02/issues/1"},"comments":{"href":"https://api.github.com/repos/MichailOsipov/Task02/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/MichailOsipov/Task02/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/MichailOsipov/Task02/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MichailOsipov/Task02/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/MichailOsipov/Task02/statuses/d52fdc3fe23b4ed4687c7e7c58c9445274909d5e"}}}}