prompts.chatprompts.chatprompts.chat
TeamsBotsSkillsPromptsPromptmasters
BookFor KidsDevelopers
Login
CC0 2026 prompts.chat
DeepWikiHow to...DocsAPIPrivacyTermsSupportAboutGitHub

Advanced Calculator in C++

An advanced C++ program to perform complex arithmetic operations including addition, subtraction, multiplication, division, and modulo.

S
@spiritqmards
11 months agoDecember 22, 2025 at 02:39 AM
Coding•CAdvancedCode Review

Content

1#include <iostream>
2using namespace std;
3
4int main() {
5 char operation;
6 float num1, num2;
7
8 cout << "Enter operator (+, -, *, /, %): ";
9 cin >> operation;
10
11 cout << "Enter two operands: ";
12 cin >> num1 >> num2;
13
14 switch(operation) {
15 case '+':
16 cout << num1 << " + " << num2 << " = " << num1 + num2;
17 break;
18 case '-':
19 cout << num1 << " - " << num2 << " = " << num1 - num2;
20 break;
21 case '*':
22 cout << num1 << " * " << num2 << " = " << num1 * num2;
23 break;
24 case '/':
25 if(num2 != 0)
26 cout << num1 << " / " << num2 << " = " << num1 / num2;
27 else
28 cout << "Error! Division by zero.";
29 break;
30 case '%':
31 if(static_cast<int>(num2) != 0)
32 cout << static_cast<int>(num1) << " % " << static_cast<int>(num2) << " = " << static_cast<int>(num1) % static_cast<int>(num2);
33 else
34 cout << "Error! Division by zero.";
35 break;
36 default:
37 cout << "Error! Operator is not correct";
38 break;
39 }
40
41 return 0;
42}

Related Skills

OpenAPI Spec Drift Checker

Skill

Compares an OpenAPI YAML/JSON spec to a list of implemented routes and flags drift: missing operations, extra routes, method mismatches, and path-parameter shape differences. Use when reviewing API PRs, before a release, or asking "does our code still match the OpenAPI?". Includes a stdlib Python checker with --self-test.

F@f
0

Database Migration Safety Review

Skill

Reviews PostgreSQL and MySQL schema migrations (raw SQL or ORM-generated) for table locks, rewrites, data loss, and breaking changes, then proposes safe zero-downtime rewrites with a clear verdict.

Related Bots

API Contract Guardian

Bot

Compares OpenAPI or GraphQL schema changes in pull requests and warns about breaking changes for existing clients.

F@f0

Comments (0)

F
@f
0

Post-Implementation Audit

Skill

A read-only post-implementation audit workflow for coding agents. Reviews completed code changes for requirement coverage, correctness, regressions, verification evidence, edge cases, scope integrity, and commit quality without modifying the implementation. Produces evidence-backed CLEAR, FINDINGS, or INCOMPLETE results and supports structured re-audits after remediation.

s@songolge-lab
1

Skill Maintenance Audit

Skill

A read-only maintenance audit workflow for Agent Skills. Reviews existing skills for stale or version-sensitive guidance, trigger conflicts, overlap, broken references, unsafe helper behavior, specification drift, context bloat, and outdated technology assumptions. Verifies material freshness claims against authoritative sources and reports only evidence-backed maintenance findings without modifying the audited skills.

s@songolge-lab
2

Codebase Onboarding Guide

Bot

Helps new teammates learn a repository: answers 'where is X handled?' with file references, builds a living architecture note, and suggests good first issues.

1 scheduled routine
F@f0

Docs Drift Detector

Bot

Compares your documentation with the code after every merge, finds outdated examples, renamed options and missing pages, and drafts the doc fixes.

1 scheduled routine1 event trigger
F@f1

Test Coverage Gap Finder

Bot

Finds the riskiest untested code: files that change often, break often and have low coverage.

1 scheduled routine
F@f0