Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package BASICJAVA;
- import java.util.Scanner;
- /**
- *
- * @author ABIR
- */
- public class Array_Input_Reverse_Break_Even {
- public static void main(String[]args){
- Scanner abir =new Scanner(System.in);
- int[] number=new int[10];
- for (int i = 0; i < number.length; i++) {
- System.out.println("Enter your "+(i+1)+" number");
- number[i]=abir.nextInt();
- }
- for (int i = number.length-1; i > 0; i--) {
- if (number[i]%2==0) {
- System.out.println("your Last odd number is "+ number[i]);
- break;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment