{"comment":{"url":"https://api.github.com/repos/jalu198/Hackademy-exercise-2/comments/31035668","html_url":"https://github.com/jalu198/Hackademy-exercise-2/commit/d674ff2cf26225940d2c81ab386d7b7907424b6e#commitcomment-31035668","id":31035668,"node_id":"MDEzOkNvbW1pdENvbW1lbnQzMTAzNTY2OA==","user":{"login":"jalu198","id":44238863,"node_id":"MDQ6VXNlcjQ0MjM4ODYz","avatar_url":"https://avatars2.githubusercontent.com/u/44238863?v=4","gravatar_id":"","url":"https://api.github.com/users/jalu198","html_url":"https://github.com/jalu198","followers_url":"https://api.github.com/users/jalu198/followers","following_url":"https://api.github.com/users/jalu198/following{/other_user}","gists_url":"https://api.github.com/users/jalu198/gists{/gist_id}","starred_url":"https://api.github.com/users/jalu198/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jalu198/subscriptions","organizations_url":"https://api.github.com/users/jalu198/orgs","repos_url":"https://api.github.com/users/jalu198/repos","events_url":"https://api.github.com/users/jalu198/events{/privacy}","received_events_url":"https://api.github.com/users/jalu198/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":null,"commit_id":"d674ff2cf26225940d2c81ab386d7b7907424b6e","created_at":"2018-10-24T23:22:21Z","updated_at":"2018-10-24T23:22:21Z","author_association":"OWNER","body":"package numerosprimos;\r\n\r\nimport java.util.ArrayList;\r\n\r\npublic class NumerosPrimos {\r\n\r\n    public static void main(String[] args) {\r\n        int n1 = 10001, n2 = 2;\r\n        ArrayList<Integer> NumeroPrevio = new ArrayList<Integer>();\r\n\t\t\r\n\t\twhile (NumeroPrevio.size() < n1){\t\t\t\r\n\t\t\tboolean div = false;\r\n \t\t\tfor (int numeroPrimo : NumeroPrevio){\r\n                            if (n2 % numeroPrimo == 0 && numeroPrimo != n2){\r\n\t\t\t\tdiv = true;\r\n\t\t\t\tbreak; \r\n                            }\r\n\t\t\t}\r\n \t\t\tif(!div){\r\n\t\t\t\tif(!NumeroPrevio.contains(n2))\r\n                                    NumeroPrevio.add(n2);\t\t\r\n\t\t\t}\r\n                    n2++;\t\t\r\n\t\t}\r\n \t\tSystem.out.println(\"Lista de números primos: \" + NumeroPrevio);\t\r\n\t\tSystem.out.println(\"El \" + n1 + \"número primo es:\" + NumeroPrevio.get(NumeroPrevio.size()-1));\r\n\t\t\r\n    }\r\n    \r\n}\r\n"}}
{"actor":{"display_login":"jalu198"}}