import java.io.*;
class ArrayDemoIo {
public static void main(String[] args)
{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
int a[] = new int [5];
int i;
for(i =0 ;i<= 4 ; i++)
{
try
{
a[i] = Integer.parseInt(br.readLine());
}
catch(Exception e)
{
System.out.println("Exception in io or coversion");
}
}
for(i =0 ;i<= 4 ; i++)
{
System.out.println("a["+i+"]= "+a[i]);
}
}
}
0 comments:
Post a Comment