{"id":22419030,"url":"https://github.com/en10/primes-c","last_synced_at":"2026-04-29T08:01:46.429Z","repository":{"id":75872198,"uuid":"174819143","full_name":"EN10/Primes-C","owner":"EN10","description":"Primes in C","archived":false,"fork":false,"pushed_at":"2019-05-16T10:34:12.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T04:32:07.217Z","etag":null,"topics":["c","primes","python"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EN10.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-10T12:16:15.000Z","updated_at":"2019-05-16T10:34:22.000Z","dependencies_parsed_at":"2023-02-24T10:15:39.489Z","dependency_job_id":null,"html_url":"https://github.com/EN10/Primes-C","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EN10/Primes-C","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EN10%2FPrimes-C","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EN10%2FPrimes-C/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EN10%2FPrimes-C/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EN10%2FPrimes-C/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EN10","download_url":"https://codeload.github.com/EN10/Primes-C/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EN10%2FPrimes-C/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32416146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","primes","python"],"created_at":"2024-12-05T16:13:54.396Z","updated_at":"2026-04-29T08:01:46.424Z","avatar_url":"https://github.com/EN10.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Primes-C\nPrimes in C\n\n\n\t#include \u003cstdio.h\u003e\n\n\tint main(){\n\n\tint primesupto = 100;\n\tint i,j;\n\tint isprime = 1;\n\n\t    for (i=2; i\u003cprimesupto; i++){\n\t        for (j=2; j\u003ci/2; j++){    \n\t            if (i%j==0) isprime = 0;\n\t        }\n\t    if (isprime == 1)       printf(\"%i \\n\",i);\n\t    isprime = 1;\n\t    }\n\t}\n\n\n`isprime` is an `int` as no Boolean in C \\\n \\\n`i/2` could be replaced by `sqrt(i)` but: \\\n* needs `#include \u003cmath.h\u003e` \\\n* `i,j` as `double` \\\n* `i%j` becomes `fmod(i,j)` \\\n* `\"%i \\n\",i` becomes `\"%i \\n\",(int)i`\n\n### Benchmark:\n\n\ttime python primes.py\n\t\n\ttime ./a.out","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fen10%2Fprimes-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fen10%2Fprimes-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fen10%2Fprimes-c/lists"}