14 Feb PMCA Sunday 10:00 Java Homework 20.02.09.
Question:
Write a method that returns an array of 10 even number number by following the below stated rules:
- If the input number is an even start from that number and print the next 10 even numbers starting from that number
- if the input number is an odd number find the next even number and print the next 10 even numbers starting from that number
Sample Input 1:
4
Sample Output 1:
[4,6,8,10,12,14,16,18,20,22]
Sample Input 2:
5
Sample Output 2:
[6,8,10,12,14,16,18,20,22,24]
Sample Input 3:
7
Sample Output 3:
[8,10,12,14,16,18,20,22,24,26]
Sorry, the comment form is closed at this time.