id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

maxResult


Given two numbers, consider their product and their sum. Return whichever result is the largest.


maxResult(3, 5) → 15
maxResult(1, 1) → 2
maxResult(0, 17) → 17

...Save, Compile, Run (ctrl-enter)

int maxResult(int a, int b) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 100

Copyright Nick Parlante 2017 - privacy