1x = 1, y = 2;
2fmax(x , y);
3//if you want to print it right away:
4cout << fmax(x , y);
5//if you want to store it:
6int j = fmax(x, y);
7cout << j;
8
9//output 2
1int maximumValue(int array[] , int n){
2 int max=array[0];
3 for int i=1;i < n;i++ {
4 if (array[i] > max)
5 max = array[i];
6
7 }
8 return max;
9}
10