Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- public int intMax(int a, int b, int c) {
- int max;
- if (a > b) {
- max = a;
- } else {
- max = b;
- }
- if (c > max) {
- max = c;
- }
- return max;
- }
- public boolean in3050(int a, int b) {
- if (a >= 30 && a <= 40 && b >= 30 && b <= 40) {
- return true;
- }
- if (a >= 40 && a <= 50 && b >= 40 && b <= 50) {
- return true;
- }
- return false;
- }
- public int redTicket(int a, int b, int c) {
- if (a == 2 && b == 2 && c == 2)
- return 10;
- if ( a == b && b == c)
- return 5;
- if ( a != b && a != c)
- return 1;
- else
- return 0;
- }
- public int teaParty(int tea, int candy) {
- if (tea < 5 || candy < 5)
- return 0;
- if ((tea >= 2 * candy) || (candy >= 2 * tea))
- return 2;
- else
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement