how do i implement "int getSum(int A, int B, int C) into this code"
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <iostream>
#include <cmath>
usingnamespace std;
//int getSum(int A, int B, int C)
int main(){
// Write your code here
int a=1;
int b=2;
int c=3;
cout<< a+b+c;
return 0;
}
on my cout line do I have to use getSum? if so what am I doing wrong?
or can I just use A+B+C
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <iostream>
#include <cmath>
usingnamespace std;
int getSum(int A, int B, int C) {
return A+B+C;
}
int main (){
int A= 1;
int B= 2;
int C= 3;
cout<< getSum;
return 0;
}