Jump to content

while

Go to solution Solved by Dat Guy,

You can use CODE blocks here. Screenshots are harder to debug for us.

 

Anyway, here's a hint:

 

int max1 = 0;
int max2 = 0;

// ...

if (x > max1) max1 = x;
else if (x > max2) max2 = x;

 

The rest is left as an exercise to the reader.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×