[code =java]
package integersequence;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class IntegerSequence {
public static void main(String[] args) {
BufferedReader dataIn= new BufferedReader(new InputStreamReader (System.in));
String length = "";
System.out.println("Enter the Length:");
try{
length = dataIn.readLine();
} catch (IOException e){
System.out.print("Error");
}
System.out.println("The Length is:"+ length);
String ring = "";
System.out.println("Enter the Ring Width:");
try{
ring = dataIn.readLine();
} catch (IOException e){
System.out.print("Error");
}
System.out.println("The Ring Width is:"+ ring);
String sint = "";
System.out.println("Enter the integers:");
try{
sint = dataIn.readLine();
} catch (IOException e){
System.out.print("Error");
}
System.out.println("The Value of Integers are:"+ sint);
int x;
x= Integer.parseInt(length);
int[] anArray;
anArray = new int[x];
}
}
[/code]
i can't produce the answer
example answer on the output should be:
This is an integer chain of length 6 with rings of 3
or
Integer chain is broken at 6.
or
Sequence length is outside the requirements range.