{"action":"created","comment":{"url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/pulls/comments/81633751","pull_request_review_id":2599472,"id":81633751,"diff_hunk":"@@ -0,0 +1,81 @@\n+import java.util.*;\r\n+/**\r\n+ *  This class is intended for search roots of a quadratic equation.\r\n+ *  Entrance point to the program.\r\n+ *\r\n+ *  @author Siarhei Tuzhyk\r\n+ *  @version 1.1\r\n+ *  @since 03-10-2016\r\n+ */\r\n+public class QuadraticEquation {\r\n+    // Add constant observational error, instead of comparing the variables with zero. Number is very close to 0.\r\n+    public static final double EPS = 10e-15;\r\n+    /**\r\n+     * Entrance to solution.\r\n+     * This method required for the use of methods to input the coefficients of quadratic equation and finding roots.\r\n+     *\r\n+     * @param args arguments from command line.\r\n+     */\r\n+    public static void main(String[] args) {\r\n+        // Data input\r\n+        System.out.println(\"Please, enter coefficients of quadratic equation:\");\r\n+        double[] coefficients = new double[3];\r\n+        coefficients = inputCoefficients(coefficients);\r\n+        // Operation for searching roots of quadratic equation\r\n+        searchRootsOfQuadraticEquation(coefficients);\r\n+    }\r\n+    /**\r\n+     * This method is intended to enter the coefficients of quadratic equation.\r\n+     *\r\n+     * @param coefficients array of coefficients of quadratic equation.\r\n+     * @return array with input variables.\r\n+    */\r\n+    public static double[] inputCoefficients(double[] coefficients) {\r\n+        Scanner scanner = new Scanner(System.in);\r\n+        try {\r\n+            for (int i = 0; i < coefficients.length; i++) {\r\n+                System.out.print((i + 1) + \" coefficient = \");\r\n+                coefficients[i] = scanner.nextDouble();\r\n+                // Check first coefficients equal to zero\r\n+                if (i == 0) {\r","path":"QuadraticEquation.java","position":40,"original_position":40,"commit_id":"9b7e8863c91a55b2bd9fd1e29641f4134226ecdd","original_commit_id":"9b7e8863c91a55b2bd9fd1e29641f4134226ecdd","user":{"login":"AlexanderSoroka","id":7944118,"avatar_url":"https://avatars.githubusercontent.com/u/7944118?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderSoroka","html_url":"https://github.com/AlexanderSoroka","followers_url":"https://api.github.com/users/AlexanderSoroka/followers","following_url":"https://api.github.com/users/AlexanderSoroka/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderSoroka/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderSoroka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderSoroka/subscriptions","organizations_url":"https://api.github.com/users/AlexanderSoroka/orgs","repos_url":"https://api.github.com/users/AlexanderSoroka/repos","events_url":"https://api.github.com/users/AlexanderSoroka/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderSoroka/received_events","type":"User","site_admin":false},"body":"This check will be performed on each iteration but plays role only for the i == 0; it definitly must be outside cycle","created_at":"2016-10-03T20:33:08Z","updated_at":"2016-10-03T20:34:14Z","html_url":"https://github.com/SiarheiTuzhyk/AT-2016-1/pull/1#discussion_r81633751","pull_request_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/pulls/comments/81633751"},"html":{"href":"https://github.com/SiarheiTuzhyk/AT-2016-1/pull/1#discussion_r81633751"},"pull_request":{"href":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/pulls/1","id":87639790,"html_url":"https://github.com/SiarheiTuzhyk/AT-2016-1/pull/1","diff_url":"https://github.com/SiarheiTuzhyk/AT-2016-1/pull/1.diff","patch_url":"https://github.com/SiarheiTuzhyk/AT-2016-1/pull/1.patch","issue_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/issues/1","number":1,"state":"open","locked":false,"title":"Homework #1, Task 1-5","user":{"login":"SiarheiTuzhyk","id":22577812,"avatar_url":"https://avatars.githubusercontent.com/u/22577812?v=3","gravatar_id":"","url":"https://api.github.com/users/SiarheiTuzhyk","html_url":"https://github.com/SiarheiTuzhyk","followers_url":"https://api.github.com/users/SiarheiTuzhyk/followers","following_url":"https://api.github.com/users/SiarheiTuzhyk/following{/other_user}","gists_url":"https://api.github.com/users/SiarheiTuzhyk/gists{/gist_id}","starred_url":"https://api.github.com/users/SiarheiTuzhyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SiarheiTuzhyk/subscriptions","organizations_url":"https://api.github.com/users/SiarheiTuzhyk/orgs","repos_url":"https://api.github.com/users/SiarheiTuzhyk/repos","events_url":"https://api.github.com/users/SiarheiTuzhyk/events{/privacy}","received_events_url":"https://api.github.com/users/SiarheiTuzhyk/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-02T17:14:15Z","updated_at":"2016-10-03T20:34:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d62583d61e3f8e289633d6138eb94ca42e9e4ec","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/pulls/1/commits","review_comments_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/pulls/1/comments","review_comment_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/issues/1/comments","statuses_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/statuses/9b7e8863c91a55b2bd9fd1e29641f4134226ecdd","head":{"label":"SiarheiTuzhyk:dev","ref":"dev","sha":"9b7e8863c91a55b2bd9fd1e29641f4134226ecdd","user":{"login":"SiarheiTuzhyk","id":22577812,"avatar_url":"https://avatars.githubusercontent.com/u/22577812?v=3","gravatar_id":"","url":"https://api.github.com/users/SiarheiTuzhyk","html_url":"https://github.com/SiarheiTuzhyk","followers_url":"https://api.github.com/users/SiarheiTuzhyk/followers","following_url":"https://api.github.com/users/SiarheiTuzhyk/following{/other_user}","gists_url":"https://api.github.com/users/SiarheiTuzhyk/gists{/gist_id}","starred_url":"https://api.github.com/users/SiarheiTuzhyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SiarheiTuzhyk/subscriptions","organizations_url":"https://api.github.com/users/SiarheiTuzhyk/orgs","repos_url":"https://api.github.com/users/SiarheiTuzhyk/repos","events_url":"https://api.github.com/users/SiarheiTuzhyk/events{/privacy}","received_events_url":"https://api.github.com/users/SiarheiTuzhyk/received_events","type":"User","site_admin":false},"repo":{"id":69810302,"name":"AT-2016-1","full_name":"SiarheiTuzhyk/AT-2016-1","owner":{"login":"SiarheiTuzhyk","id":22577812,"avatar_url":"https://avatars.githubusercontent.com/u/22577812?v=3","gravatar_id":"","url":"https://api.github.com/users/SiarheiTuzhyk","html_url":"https://github.com/SiarheiTuzhyk","followers_url":"https://api.github.com/users/SiarheiTuzhyk/followers","following_url":"https://api.github.com/users/SiarheiTuzhyk/following{/other_user}","gists_url":"https://api.github.com/users/SiarheiTuzhyk/gists{/gist_id}","starred_url":"https://api.github.com/users/SiarheiTuzhyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SiarheiTuzhyk/subscriptions","organizations_url":"https://api.github.com/users/SiarheiTuzhyk/orgs","repos_url":"https://api.github.com/users/SiarheiTuzhyk/repos","events_url":"https://api.github.com/users/SiarheiTuzhyk/events{/privacy}","received_events_url":"https://api.github.com/users/SiarheiTuzhyk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SiarheiTuzhyk/AT-2016-1","description":null,"fork":false,"url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1","forks_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/forks","keys_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/teams","hooks_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/hooks","issue_events_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/issues/events{/number}","events_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/events","assignees_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/assignees{/user}","branches_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/branches{/branch}","tags_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/tags","blobs_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/statuses/{sha}","languages_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/languages","stargazers_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/stargazers","contributors_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/contributors","subscribers_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/subscribers","subscription_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/subscription","commits_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/contents/{+path}","compare_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/merges","archive_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/downloads","issues_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/issues{/number}","pulls_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/pulls{/number}","milestones_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/milestones{/number}","notifications_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/labels{/name}","releases_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/releases{/id}","deployments_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/deployments","created_at":"2016-10-02T17:13:16Z","updated_at":"2016-10-02T17:13:16Z","pushed_at":"2016-10-03T20:27:26Z","git_url":"git://github.com/SiarheiTuzhyk/AT-2016-1.git","ssh_url":"git@github.com:SiarheiTuzhyk/AT-2016-1.git","clone_url":"https://github.com/SiarheiTuzhyk/AT-2016-1.git","svn_url":"https://github.com/SiarheiTuzhyk/AT-2016-1","homepage":null,"size":16,"stargazers_count":0,"watchers_count":0,"language":null,"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":"SiarheiTuzhyk:master","ref":"master","sha":"f99682ab575d21b393b5e18a348cf6f956666234","user":{"login":"SiarheiTuzhyk","id":22577812,"avatar_url":"https://avatars.githubusercontent.com/u/22577812?v=3","gravatar_id":"","url":"https://api.github.com/users/SiarheiTuzhyk","html_url":"https://github.com/SiarheiTuzhyk","followers_url":"https://api.github.com/users/SiarheiTuzhyk/followers","following_url":"https://api.github.com/users/SiarheiTuzhyk/following{/other_user}","gists_url":"https://api.github.com/users/SiarheiTuzhyk/gists{/gist_id}","starred_url":"https://api.github.com/users/SiarheiTuzhyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SiarheiTuzhyk/subscriptions","organizations_url":"https://api.github.com/users/SiarheiTuzhyk/orgs","repos_url":"https://api.github.com/users/SiarheiTuzhyk/repos","events_url":"https://api.github.com/users/SiarheiTuzhyk/events{/privacy}","received_events_url":"https://api.github.com/users/SiarheiTuzhyk/received_events","type":"User","site_admin":false},"repo":{"id":69810302,"name":"AT-2016-1","full_name":"SiarheiTuzhyk/AT-2016-1","owner":{"login":"SiarheiTuzhyk","id":22577812,"avatar_url":"https://avatars.githubusercontent.com/u/22577812?v=3","gravatar_id":"","url":"https://api.github.com/users/SiarheiTuzhyk","html_url":"https://github.com/SiarheiTuzhyk","followers_url":"https://api.github.com/users/SiarheiTuzhyk/followers","following_url":"https://api.github.com/users/SiarheiTuzhyk/following{/other_user}","gists_url":"https://api.github.com/users/SiarheiTuzhyk/gists{/gist_id}","starred_url":"https://api.github.com/users/SiarheiTuzhyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SiarheiTuzhyk/subscriptions","organizations_url":"https://api.github.com/users/SiarheiTuzhyk/orgs","repos_url":"https://api.github.com/users/SiarheiTuzhyk/repos","events_url":"https://api.github.com/users/SiarheiTuzhyk/events{/privacy}","received_events_url":"https://api.github.com/users/SiarheiTuzhyk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SiarheiTuzhyk/AT-2016-1","description":null,"fork":false,"url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1","forks_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/forks","keys_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/teams","hooks_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/hooks","issue_events_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/issues/events{/number}","events_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/events","assignees_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/assignees{/user}","branches_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/branches{/branch}","tags_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/tags","blobs_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/statuses/{sha}","languages_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/languages","stargazers_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/stargazers","contributors_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/contributors","subscribers_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/subscribers","subscription_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/subscription","commits_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/contents/{+path}","compare_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/merges","archive_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/downloads","issues_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/issues{/number}","pulls_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/pulls{/number}","milestones_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/milestones{/number}","notifications_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/labels{/name}","releases_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/releases{/id}","deployments_url":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/deployments","created_at":"2016-10-02T17:13:16Z","updated_at":"2016-10-02T17:13:16Z","pushed_at":"2016-10-03T20:27:26Z","git_url":"git://github.com/SiarheiTuzhyk/AT-2016-1.git","ssh_url":"git@github.com:SiarheiTuzhyk/AT-2016-1.git","clone_url":"https://github.com/SiarheiTuzhyk/AT-2016-1.git","svn_url":"https://github.com/SiarheiTuzhyk/AT-2016-1","homepage":null,"size":16,"stargazers_count":0,"watchers_count":0,"language":null,"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/SiarheiTuzhyk/AT-2016-1/pulls/1"},"html":{"href":"https://github.com/SiarheiTuzhyk/AT-2016-1/pull/1"},"issue":{"href":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/issues/1"},"comments":{"href":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/SiarheiTuzhyk/AT-2016-1/statuses/9b7e8863c91a55b2bd9fd1e29641f4134226ecdd"}}}}
{"actor":{"display_login":"AlexanderSoroka"}}