Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class numbers {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int num = Integer.parseInt(scan.nextLine());
- if (num > 9 && num <= 99) {
- if (num % 2 == 0) {
- System.out.println(num + 7);
- } if (num % 10 == 5) {
- System.out.println(num + 10);
- }
- if (num % 2 == 0 ||num % 10 == 5 ){
- System.out.println(num+7+10);
- }
- } else {
- System.out.println("error");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment