Hey guys im new to c++ / programming in general.

currently working on an assignment and i just about got it, but im having trouble debugging it and fixing my problems.

could anyone help me correct this PLEASE!!

// lab2.h

#include <iostream>

#include <cmath>

using namespace std;

//functions used...

void instructUser();

float computeSum(num1,num2,num3,num4);

float computeDifference(num1,num2,num3,num4);

float computeProduct(num1,num2,num3,num4);

float computeQuotient(num1,num2,num3,num4);

int main ()

{

float num1;//input: first number

float num2;//input: second number

float num3;//input: third number

float num4;//input: fourth number

char action;//input: operator

float sum;//output: sum

float difference;//output: difference

float product;//output: product

float quotient;//output: quotient

instructUser();

cout << "Input four numbers each followed by a space, and the operation" << endl;

cout << "you wish to use on these numbers. The operators are; + , - , * , / ." << endl;

cin >> num1 >> num2 >> num3 >> num4 >> action;//take in the four numbers and operator

if( action == '+' )

sum = computeSum(num1,num2,num3,num4);//if the action is add, initiate computeSum

else

if(action == '-' )

difference = computeDifference(num1,num2,num3,num4);//if the action is minus, initiate computeDifference

else

if(action == '*' )

product = computeProduct(num1,num2,num3,num4);//if the action is multiply, initiate computeProduct

else

if(action == '/' )

quotient = computeQuotient(num1,num2,num3,num4);//if the action is divide, initiate computeQuotient

//print out the sum, difference, product, or quotient.

if( action == '+' )

cout << "The sum of the four numbers is " << sum << "." << endl;

else

if(action == '-' )

cout << "The difference of the four numbers is " << difference << "." << endl;

else

if(action == '*' )

cout << "The product of the four numbers is " << product << "." << endl;

else

if(action == '/' )

cout << "The quotient of the four numbers is " << quotient << "." << endl;

return 0;

}

//display user instructions

void instructUser();

{

cout << "This program takes any four numbers desired by the user and computes " << endl;

cout << "one mathematical operation to all of the numbers. If the user chooses " << endl;

cout << "addition, then the sum of the four numbers is computed, and so on.." << endl;

}

// compute sum

float computeSum()

{

sum = num1 + num2 + num3 + num4;

return sum;

}

//compute difference

float computeDifference()

{

difference = num1 - num2 - num3 - num4;

return difference;

}

//compute product

float computeProduct()

{

product = num1 * num2 * num3 * num4;

return product;

}

//compute quotient

float computeQuotient()

{

quotient = num1 / num2 / num3 / num4;

return quotient;

}

currently working on an assignment and i just about got it, but im having trouble debugging it and fixing my problems.

could anyone help me correct this PLEASE!!

// lab2.h

#include <iostream>

#include <cmath>

using namespace std;

//functions used...

void instructUser();

float computeSum(num1,num2,num3,num4);

float computeDifference(num1,num2,num3,num4);

float computeProduct(num1,num2,num3,num4);

float computeQuotient(num1,num2,num3,num4);

int main ()

{

float num1;//input: first number

float num2;//input: second number

float num3;//input: third number

float num4;//input: fourth number

char action;//input: operator

float sum;//output: sum

float difference;//output: difference

float product;//output: product

float quotient;//output: quotient

instructUser();

cout << "Input four numbers each followed by a space, and the operation" << endl;

cout << "you wish to use on these numbers. The operators are; + , - , * , / ." << endl;

cin >> num1 >> num2 >> num3 >> num4 >> action;//take in the four numbers and operator

if( action == '+' )

sum = computeSum(num1,num2,num3,num4);//if the action is add, initiate computeSum

else

if(action == '-' )

difference = computeDifference(num1,num2,num3,num4);//if the action is minus, initiate computeDifference

else

if(action == '*' )

product = computeProduct(num1,num2,num3,num4);//if the action is multiply, initiate computeProduct

else

if(action == '/' )

quotient = computeQuotient(num1,num2,num3,num4);//if the action is divide, initiate computeQuotient

//print out the sum, difference, product, or quotient.

if( action == '+' )

cout << "The sum of the four numbers is " << sum << "." << endl;

else

if(action == '-' )

cout << "The difference of the four numbers is " << difference << "." << endl;

else

if(action == '*' )

cout << "The product of the four numbers is " << product << "." << endl;

else

if(action == '/' )

cout << "The quotient of the four numbers is " << quotient << "." << endl;

return 0;

}

//display user instructions

void instructUser();

{

cout << "This program takes any four numbers desired by the user and computes " << endl;

cout << "one mathematical operation to all of the numbers. If the user chooses " << endl;

cout << "addition, then the sum of the four numbers is computed, and so on.." << endl;

}

// compute sum

float computeSum()

{

sum = num1 + num2 + num3 + num4;

return sum;

}

//compute difference

float computeDifference()

{

difference = num1 - num2 - num3 - num4;

return difference;

}

//compute product

float computeProduct()

{

product = num1 * num2 * num3 * num4;

return product;

}

//compute quotient

float computeQuotient()

{

quotient = num1 / num2 / num3 / num4;

return quotient;

}