#include <iostream>
#include <math.h>
using namespace std;
int Square(int num, int& Answer);
int Triangle(int num);
int main(int argc, char **argv)
{
int num = -1;
int Answer;
//Prompts the user for the length of the sides and doesnt stop until they enter a valid input
while(num >= 6 || num <= 1){
cout<<"Enter a number from 1 to 6: ";
cin>>num;
}
Square(int num, int& Answer);
Triangle(int num, int&Answer);
}
int Square(int num, int& Answer){
Answer = num * num;
cout<<Answer;
}
int Triangle(int num, int& Answer){
Answer = .5 * (num * num);
cout<<Answer;
}
I'm not sure what I ma doing wrong but the error I keep getting is, expected primary-expression before 'int'
This is where the error is and it shows up on each instance of int
Square(int num, int& Answer);
Triangle(int num, int&Answer);