Calculater code

Discussion in 'C Programming' started by Thiefcom, Jun 2, 2017.

  1. Thiefcom

    Thiefcom

    Joined:
    Jun 1, 2017
    Messages:
    55
    Likes Received:
    7
    #include <iostream>
    using namespace std;

    int main()
    {
    cout << "I need two numbers please." << endl;
    /*
    made by Thiefcom not you ha i'm joking some kids most likely go to steal this code for a school project
    */
    cout << "First num" << endl;
    bool a;
    cin >> a;

    cout << "second number please" << endl;
    bool b;
    cin >> b;

    cout << a << "+" << b << "=" << a + b << endl;
    cout << a << "-" << b << "=" << a - b << endl;
    cout << a << "x" << b << "=" << a * b << endl;
    cout << a << "/" << b << "=" << a / b << endl;
    return 0;
    }
     
    Thiefcom, Jun 2, 2017
    #1
    John Joe likes this.
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
Loading...