{"id":30878902,"url":"https://github.com/sandra1me/c-console-calculator","last_synced_at":"2025-10-25T16:08:06.319Z","repository":{"id":307619658,"uuid":"1030138116","full_name":"Sandra1me/C-Console-Calculator","owner":"Sandra1me","description":"This is a simple console-based calculator written in C. It is a tool with support for powers, roots, trigonometric functions, factorials, and a history of recent results. It also lets you reuse the previous result in new operations.","archived":false,"fork":false,"pushed_at":"2025-09-03T17:31:10.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-03T19:35:48.186Z","etag":null,"topics":["beginner-friendly","c","calculator","command-line","console-application","educational","math","math-functions","terminal-app"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sandra1me.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-08-01T06:33:57.000Z","updated_at":"2025-09-03T17:31:14.000Z","dependencies_parsed_at":"2025-08-01T08:55:50.519Z","dependency_job_id":"5d9272b7-01d0-4b2a-abff-57f4b8d4f587","html_url":"https://github.com/Sandra1me/C-Console-Calculator","commit_stats":null,"previous_names":["sandra1me/c-console-calculator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Sandra1me/C-Console-Calculator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandra1me%2FC-Console-Calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandra1me%2FC-Console-Calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandra1me%2FC-Console-Calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandra1me%2FC-Console-Calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sandra1me","download_url":"https://codeload.github.com/Sandra1me/C-Console-Calculator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandra1me%2FC-Console-Calculator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274140319,"owners_count":25229139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["beginner-friendly","c","calculator","command-line","console-application","educational","math","math-functions","terminal-app"],"created_at":"2025-09-08T05:48:40.056Z","updated_at":"2025-10-25T16:08:06.215Z","avatar_url":"https://github.com/Sandra1me.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C Console Calculator\n\nThis is a simple console-based calculator written in C. It started as a basic exercise to practice control structures, input/output, and error handling. Over time, it evolved into a more complete tool with support for powers, roots, trigonometric functions, factorials, and a history of recent results. It also lets you reuse the previous result in new operations.\n\n## Features\n\n- Basic operations: addition, subtraction, multiplication, division\n- Powers and roots\n- Trigonometric functions: sine and cosine\n- Factorials (only for positive integers)\n- Option to reuse the previous result\n- Displays the last 5 results in a history list\n- Input validation to prevent crashes\n- Input buffer cleaning to avoid invalid reads\n\n## Compilation\n\nUse `gcc` to compile the program:\n\n```c\ngcc calculator.c -o calculator -lm\n```\n\n## Usage\nRun the program from the terminal:\n\n```c\n./calculator\n```\n\nFollow the menu instructions to select an operation. After each operation, you'll be able to decide whether to continue and whether to reuse the previous result. The calculator will also display a list of your last 5 results.\n\n## Example\n\n\u003cimg width=\"842\" height=\"847\" alt=\"Calculator Console\" src=\"https://github.com/user-attachments/assets/4d7d81c9-6a65-4719-adcf-a3c53c76ec61\" /\u003e\n\n\n## Future Improvements\n\n- Add more math functions like tangent or logarithms\n- Save result history to a text file\n- Improve the interface with a more visual menu system\n- Create a GUI version in C++ or another language\n\n## License\n\nThis project is licensed under the [MIT Licence](https://choosealicense.com/licenses/mit/). Feel free to use, modify, or distribute it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandra1me%2Fc-console-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandra1me%2Fc-console-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandra1me%2Fc-console-calculator/lists"}