TopcoderARCHIVE
Archive/Problems/BiggestPaycheck
Algorithm · Problem 13587

BiggestPaycheck

Problem statement, definition, constraints, and public examples.

Problem Statement

Your friend just asked your what is the biggest paycheck you have ever received. Since you have only been working for a few weeks, it is easy for you to figure this out. The value of your paychecks is given in ints a, b, and c. Return the value of the largest of your paychecks.

Definition

Class:
BiggestPaycheck
Method:
findBiggest
Parameters:
int, int, int
Returns:
int
Method signature:
int findBiggest(int a, int b, int c)
(be sure your method is public)

Constraints

  • a, b, and c will each be between 1 and 1000, inclusive.

Examples

  1. 50
    55
    60
    Returns: 60
    Looks like you've done better as time goes on. 60 is your biggest paycheck so far.
  2. 999
    1
    2
    Returns: 999
    You almost have to wonder if payroll made an error the first week.
  3. 50
    50
    10
    Returns: 50
    Doesn't really matter if two are tied for biggest, as it doesn't change your answer.
← All problems