Sum ex

Muthumari_B · updated August 11, 2021 · C++
#include <iostream>
using namespace std;
int sub(int a,int b);
int mul(int p,int q);
int main()
{
    int a,b,x;
    int p,q,y;
    cout<<"\nEnter any two integer for subraction"<<endl;
    cin>>a>>b;
    cout<<a<<"\n"<<b;
    cout<<"\nEnter any two integer for multiplication"<<endl;
    cin>>p>>q;
    cout<<p<<"\n"<<q;
    x=sub(a,b);
    y=mul(p,q);
    cout<<"\nThe Result is "<<x;
    cout<<"\nThe Result is "<<y;
    return 0;
}
int sub(int a,int b)
{
    return(a-b);
}
int mul(int p,int q)
{
    return(p*q);
}

Comments

Please sign up or log in to contribute to the discussion.