Advertisement
sujonshekh

Array

Jun 16th, 2016
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package array;
  6.  
  7. import java.util.Scanner;
  8.  
  9. /**
  10.  *
  11.  * @author cse
  12.  */
  13. public class Array {
  14.  
  15.     /**
  16.      * @param args the command line arguments
  17.      */
  18.     public static void main(String[] args) {
  19.         int a[]= new int[5];
  20.         Scanner sc= new Scanner(System.in);
  21.        
  22.        
  23.        for (int i=0;i<=4;i++)
  24.          a[i]=sc.nextInt();
  25.          
  26.          for (int i=0;i<=4;i++)
  27.          System.out.println(i+" : "+a[i]);
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement