This is best done with an array; that way, you can easily extend to more than three numbers. In Java, it would be something like this:
int myNumbers[] = {1, 5, 3};
int max = myNumbers[1];
for (int i = 1; i < myNumbers.length(); i++)
if (myNumbers[i] > max) max = myNumbers[i];
This is best done with an array; that way, you can easily extend to more than three numbers. In Java, it would be something like this:
int myNumbers[] = {1, 5, 3};
int max = myNumbers[1];
for (int i = 1; i < myNumbers.length(); i++)
if (myNumbers[i] > max) max = myNumbers[i];
This is best done with an array; that way, you can easily extend to more than three numbers. In Java, it would be something like this:
int myNumbers[] = {1, 5, 3};
int max = myNumbers[1];
for (int i = 1; i < myNumbers.length(); i++)
if (myNumbers[i] > max) max = myNumbers[i];
This is best done with an array; that way, you can easily extend to more than three numbers. In Java, it would be something like this:
int myNumbers[] = {1, 5, 3};
int max = myNumbers[1];
for (int i = 1; i < myNumbers.length(); i++)
if (myNumbers[i] > max) max = myNumbers[i];
Chat with our AI personalities
This is best done with an array; that way, you can easily extend to more than three numbers. In Java, it would be something like this:
int myNumbers[] = {1, 5, 3};
int max = myNumbers[1];
for (int i = 1; i < myNumbers.length(); i++)
if (myNumbers[i] > max) max = myNumbers[i];