An advanced C++ program to perform complex arithmetic operations including addition, subtraction, multiplication, division, and modulo.
1#include <iostream>2using namespace std;34int main() {5 char operation;6 float num1, num2;78 cout << "Enter operator (+, -, *, /, %): ";9 cin >> operation;1011 cout << "Enter two operands: ";12 cin >> num1 >> num2;1314 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 else28 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 else34 cout << "Error! Division by zero.";35 break;36 default:37 cout << "Error! Operator is not correct";38 break;39 }4041 return 0;42}
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.
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.
Compares OpenAPI or GraphQL schema changes in pull requests and warns about breaking changes for existing clients.
Helps new teammates learn a repository: answers 'where is X handled?' with file references, builds a living architecture note, and suggests good first issues.
Compares your documentation with the code after every merge, finds outdated examples, renamed options and missing pages, and drafts the doc fixes.
Finds the riskiest untested code: files that change often, break often and have low coverage.