Latest Posts:

ARITHMETIC OPERATION ON TWO DIGITS


#include<iostream>
using namespace std;
int main()
{
    int a,b,c,calc;
    cout<<"*************************************************************\n";
    cout<<"ARITHMETIC OPERATION ON TWO DIGITS BY lucky ibitubo*************************************************************\n\n\n\n";
    cout<<"TYPE IN EITHER OF THESE TO PERFORM IT'S FUNCTION:\n\n\n1-ADDITION\t2-MULTIPLICATION\t3-SUBTRACTION\t4-DIVISION\n\n";
    cin>>calc;
    switch(calc)
    {
        case 1:
            {
                cout<<"type in your first value:";
                cin>>a;
                cout<<"type in your second value:";
                cin>>b;
                c=a+b;
                cout<<"ANSWER="<<c;
                break;
            }
        case 2:
            {
                cout<<"type in your first value:";
                cin>>a;
                cout<<"type in your second value:";
                cin>>b;
                c=a*b;
                cout<<"ANSWER="<<c;
                break;   
            }
        case 3:
            {
                cout<<"type in your first value:";
                cin>>a;
                cout<<"type in your second value:";
                cin>>b;
                c=a-b;
                cout<<"ANSWER="<<c;
                break;
            }
        case 4:
            {
                cout<<"type in your first value:";
                cin>>a;
                cout<<"type in your second value:";
                cin>>b;
                c=a/b;
                cout<<"ANSWER="<<c;
                break;
            }
    }
    return 0;
}
Share on Google Plus

About Lucky Ibitubo

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Powered by Blogger.