Help i try to built a function which is a sum of two integers
The result must be an integer !
Check the result...
Any help it 's welcome.
/*************** *************** *************** ***** ********/
#include <iostream>
#include "math.h"
using namespace std;
int add_number(int a, int b, int c)
{
cout << "enter a" << endl;
cin >>a;
cout << "enter b "<< endl;
cin >> b;
c = a + b;
return (a, b, c);
}
int main ()
{
signed int a, b, c;
add_number(a, b, c);
cout << " the sum is :" << c << endl;
}
The result must be an integer !
Check the result...
Any help it 's welcome.
/*************** *************** *************** ***** ********/
#include <iostream>
#include "math.h"
using namespace std;
int add_number(int a, int b, int c)
{
cout << "enter a" << endl;
cin >>a;
cout << "enter b "<< endl;
cin >> b;
c = a + b;
return (a, b, c);
}
int main ()
{
signed int a, b, c;
add_number(a, b, c);
cout << " the sum is :" << c << endl;
}
Comment