C++ Program that Add Sum of Two numbers using two function
#include <iostream>
using namespace std;
int sum(int a,int b);
int main()
{
int x;
int a,b;
cout<< " Enter the first Number : ";
cin>>a;
cout<< " Enter the first Number : ";
cin>>b;
x=sum(a,b);
cout<< a<<" + " <<b<<" = "<<x<<endl;
return 0;
}
int sum(int a, int b){
int c = a+b;
return c;
}
No comments:
Post a Comment