I am not particularly strong in C++, bu here are my two cents. Finding the next biggest number when you have 3 numbers is the same as finding the middle number.
Finding the biggest number can be found by max(a, b, c) similarly the minimum is min(a, b, c). So the middle number is
$$
\text{secondBiggest(a,b,c)} = \frac{abc}{\min(a,c,b)\cdot \max(a,b,c)}
$$
If you are doing this with a list instead see http://stackoverflow.com/questions/2392689/how-can-we-find-second-maximum-from-array-efficiently
This can be coded as.
#include <stdio.h>
int find_second(int a, int b, int c) {
return a*b*c/((std::min({a, b, c}))*(std::max({a, b, c}));
int main(void)
{
int a, b, c, second;
scanf("%d %d %d", &a, &b, &c);
second = find_second(a, b, c);
printf("%d\n", second);
return 0;
}