Arithmetic Operation without using extra variable


#include<iostream.h>
#include<conio.h>

void main()
{
    int a, b;
    clrscr();

    cout<<"Enter two numbers:";
    cin>>a>>b;

    cout<<"Sum is:<<a + b;
    cout<<"Difference is:<<a - b;
    cout<<"Product is:<<a * b;
    cout<<"Division is:<<a / b;
    cout<<"Remainder is:<<a % b;
}
Previous Post Next Post