Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.company.codingbat.Warmup1;

public class makes10 {

public static boolean makes10_10 (int a, int b) {
return (a == 10 || b == 10 || a+b == 10);

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.company.codingbat.Warmup1;

public class parrotTrouble {


public static boolean parrotTrouble(boolean talking, int hour) {
return (!talking && (hour < 7 || hour > 20));
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.company.codingbat.Warmup1;

import static java.lang.System.out;
import static java.sql.Types.NULL;

public class sumDouble {
public static int sumDouble(int a, int b) {
// Store the sum in a local variable
int sum = a + b;

// Double it if a and b are the same
if (a == b && (a != NULL && b != NULL)) {
sum = sum * 2;
}

return sum;
}


public static void main(String[] args) {

out.println(sumDouble(2,2));

}
}