#include <iostream>
using namespace std;
int sum(int a,int b);
int diff(int a, int b);
int main()
{
int s,d;
int a,b;
cout<< " Enter the first Number : ";
cin>>a;
cout<< " Enter the first Number : ";
cin>>b;
s=sum(a,b);
cout<< a<<" + " <<b<<" = "<<s<<endl;
d=diff(a,b);
cout<< a<<" - " <<b<<" = "<<d<<endl;
return 0;
}
int sum(int a, int b){
int c = a+b;
return c;
}
//second function for difference
int diff(int a, int b){
int c = a-b;
return c;
}
Post Top Ad
Thursday, October 24, 2019
C++ Program that Add Sum and Difference of Two numbers using two function
Tags
# c++ Programming
About 6 Players blogs
c++ Programming
Tags:
c++ Programming
Subscribe to:
Post Comments (Atom)
ads1
Post Top Ad
Author Details
new platform in northern arewa
No comments:
Post a Comment