#include <iostream>
#include <string>
using namespace std;
class Animal
{
public:
int largestValue(int i,int j,int k){
return i > j? (i > k? i: k): (j > k? j: k);
}
};
int main()
{
Animal animal;
cout<<"4,5,6\n";
cout<<"The largest value is: "<<animal.largestValue(4,5,6)<<"\n";
cout<<"8,1,2\n";
cout<<"The largest value is: "<<animal.largestValue(8,1,2)<<"\n";
cout<<"2,10,2\n";
cout<<"The largest value is: "<<animal.largestValue(2,10,2)<<"\n";
int pause;
cin>>pause;
return 0;
}
Comments
Leave a comment