I created a program that will find the biggest number when give 3 different numbers. But when I want to change the program to find the biggest number when you enter 4 integer number I continue to run into problems. I can get it to find the biggest number when you in put 3 numbers but when I try to do four it wont let me. Please help.
#include <iostream>
using namespace std;
int findbiggest(int, int, int);
int main()
{
int x, y, z;
cout << "Please input three integers "<< endl;
cin>>x>>y>>z;
cout<<"The biggest number is "<<findbiggest(x, y, z);
return 0;
}
int findbiggest(int a, int b, int c)
{
int bigger=0;
if (a>b) bigger=a;
else bigger=b;
if (c>bigger) bigger=c;
cout<<"The biggest number is "<<bigger<<endl;
return bigger;
}