Skip to content
Open
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
8 changes: 6 additions & 2 deletions app/src/main/java/me/adamwlarson/class3/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ public void onCalculate(View view) {
}

private int centuryFromYear(int year) {
//TODO add your code yere
return 0;
int century = 0;
if (year > 0){
double result = (double) year/100.0;
century = (int) Math.ceil(result);
}
return century;
}
}