Question: nt Largest ( int a , int b , int c ) { int d = a; / / we need to initialize d =

nt Largest(int a, int b, int c){
int d = a; // we need to initialize d=a because if we start with d=0 then this won't work for the negative test cases
// if (a > d){
// d = a;
//}
if (b > d){
d = b;
} else if (c > d){
d = c;
}
return d;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!