Sum

Muthumari_B · August 11, 2021 · C++
#include <iostream>
using namespace std;
int sum( int , int);
int main() {
    int x,y,z;
    cout<<"\nx : ";
    cin>>x;
    cout<<x;
    cout<<"\ny : ";
    cin>>y;
    cout<<y;
    z = sum(x,y);
    cout<<"\nsum : "<<z;
    return 0;
}
int sum(int a,int b)
{
   return(a+b);
}

Comments

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