CS1083/Submissions/As7/CS1083-A7-StudentFiles-W2021/TestSeq.java

23 lines
454 B
Java
Raw Permalink Normal View History

2022-10-07 00:44:12 -03:00
import java.util.Scanner;
/**
A simple driver that uses the Seq class to compute the
nth element of the sequence.
*/
public class TestSeq{
public static void main(String[] args){
int n, seqRec, seqMem, seqIter;
Scanner scan = new Scanner(System.in);
System.out.print("Enter a positive integer: ");
n = scan.nextInt();
seqRec = Seq.seqR(n);
System.out.println("seqR(" + n + ") is: " + seqRec);
}
}
}