all right here is the deal, how do i fix this program? >>>
//This program will ask user to input two integers.
//main will call a user-defined function "GetSum" to return their sum.
//main will also call a system predefined function "pow" to get the square of sum.
#include
#include
using namespace std;
void Getsum(int);
int main ( )
{
int num1 = 0, num2 = 0, sum = 0, square = 0;
cout << "enter the first integer: ";
cin >> num1;
cout << "enter the second integer: ";
cin >> num2;
GetSum(num1, num2);
square = pow(sum);
cout << "Their sum is " << sum << endl;
cout << "The square of sum is " << square << endl;
return 0;
}
void GetSum(int A, int B)
{
int S = A + B;
return;
}
2006-10-31
16:52:12
·
2 answers
·
asked by
biscuits
2
in
Computers & Internet
➔ Programming & Design