0
Can any one tell me what i need to add overhere to output the result
#include <iostream> using namespace std; int addnumbers( int x, int y ,int b , int a ) { int result = x + y + b + a ; return result; ; } int main() { int x; cout << "enter the 1st n : " ; cin >> x ; int y; cout << "enter the 2nd n : " ; cin >> y ; int b ; cout << " enter the 3rd n : " ; cin >> b ; int a ; cout << " enter the 4th n : " ; cin >> a ;
2 Answers
+ 4
Call the function addnumbers in main() like :
cout<<addnumbers(x,y,b,a);