Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class LikesStatistic {
- public static void main(String[] args) {
- long likesCount = 102; // Input: any valid number of likes
- int registrationYear = 2014; // Input: any valid registration year
- int currentYear = java.time.Year.now().getValue() + 1;
- double likesPerYear = (double) likesCount / (currentYear - registrationYear); // Your formula
- System.out.println(likesPerYear + " likes / year");
- }
- }
Add Comment
Please, Sign In to add comment