Simple Calculator App

PHOTO EMBED

Fri Sep 15 2023 15:10:27 GMT+0000 (Coordinated Universal Time)

Saved by @akaeyad

#include <iostream>

using namespace std;

int main()
{
    // App 4 => Simple Calculator
    
    int num_one, num_two, op;
    cout << "[1] +\n";
    cout << "[2] -\n";
    cout << "[3] /\n";
    cout << "[4] *\n\n";
    
    cout << "Type The First Number\n";
    cin >> num_one;
    cout << "Type The Second Number\n";
    cin >> num_two;
    cout << "Type The Wanted Operation\n";
    cin >> op;
    
    if (op == 1)
    {
        cout << num_one + num_two;
    }
    else if (op == 2)
    {
        cout << num_one - num_two;
    }
    else if (op == 3)
    {
        cout << num_one / num_two;
    }
    else if (op == 4)
    {
        cout << num_one * num_two;
    }
    else 
    {
        cout << "==Your Operation Is Not Valid==";
    }
    return 0;
}
content_copyCOPY