i have written a program which adds and subtracts with functions (copied out of the book)the addition works. However when i call the subtraction function,it doesn't takeaway, it only adds.
//
//
//
#include<iostream.h>
#include<math.h>
using namespace std;
//functions.
//addition
double adding(int x,int y){
int b=y+x;
cout<<"="<<b<<endl;
return b;
};
//subtraction
double sub_traction(int a,int c){
int h=a-c;
cout<<"="<<h<<endl;
return h;
};
//program
int main (){
int sum;
int sum1;
cin>>sum>>sum1;
sub_traction(sum,sum1);
}