littleUpdate

This commit is contained in:
2024-08-31 19:14:55 +00:00
parent 7c99eef799
commit f443bd90b3
+5 -1
View File
@@ -1,3 +1,4 @@
import java.util.Scanner;
/** /**
* fibonacci * fibonacci
@@ -5,7 +6,10 @@
public class fibonacci { public class fibonacci {
public static void main(String[] args) { public static void main(String[] args) {
System.out.println("Let's try to get back on the horse!"); System.out.println("Let's try to get back on the horse!");
int fib = 7; Scanner sc = new Scanner(System.in);
System.out.println("Please enter the number you wanna search: ");
int fib = sc.nextInt();
sc.close();
System.out.println(fibonacciNum(fib)); System.out.println(fibonacciNum(fib));
} }