It is a + b
To prove there are 3 cases
1) a >b
In this case max(a,b) = a and min (a,b) = b and so sum = a +b
2) a= b
In this case max(a,b) = min (a,b) = a and so sum = 2a and a+ b= 2a
3) a < b
In this case max(a,b) = b and min (a,b) = a and so sum = a +b
so in call cases sum = a + b
To prove there are 3 cases
1) a >b
In this case max(a,b) = a and min (a,b) = b and so sum = a +b
2) a= b
In this case max(a,b) = min (a,b) = a and so sum = 2a and a+ b= 2a
3) a < b
In this case max(a,b) = b and min (a,b) = a and so sum = a +b
so in call cases sum = a + b
No comments:
Post a Comment