-
Notifications
You must be signed in to change notification settings - Fork 0
/
Test.java
32 lines (30 loc) · 2.52 KB
/
Test.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
public class Test {
int fibonacci(int number) {
if ( number <= 1) {
System.out.println("This is a sentence that should be outputed when the number is less or equal than one");
return number;
}
/* this is a test for introducing new tokens as comments Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at metus fermentum, molestie odio sed, egestas ex. Donec quam libero, vehicula ac semper id, congue sed orci. Vivamus sed vehicula risus. Proin feugiat ut elit a vestibulum. Suspendisse in pulvinar enim, id molestie nunc. Quisque finibus, libero ut elementum eleifend, nibh metus semper mauris, ut feugiat odio lorem sed est. Integer eu venenatis mauris, vel congue sapien. Nam euismod congue neque, in porta metus. Fusce semper mauris at orci maximus, id ultricies nisi cursus. Duis facilisis venenatis fringilla. Vestibulum finibus imperdiet rutrum. Aenean rutrum tincidunt libero. */
System.out.println("This is a sentence that should be outputed when the number is not less or equal than one");
if(number %2 == 0){
System.out.println("just to let you know that the number is even");
}else{
System.out.println("just to let you know that the number is odd");
}
return fibonacci(number - 1) + fibonacci(number - 2);
}
int fibonacci2(int number) {
if ( number <= 1) {
System.out.println("This is a sentence that should be outputed when the number is less or equal than one");
return number;
}
/* this is a test for introducing new tokens as comments Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at metus fermentum, molestie odio sed, egestas ex. Donec quam libero, vehicula ac semper id, congue sed orci. Vivamus sed vehicula risus. Proin feugiat ut elit a vestibulum. Suspendisse in pulvinar enim, id molestie nunc. Quisque finibus, libero ut elementum eleifend, nibh metus semper mauris, ut feugiat odio lorem sed est. Integer eu venenatis mauris, vel congue sapien. Nam euismod congue neque, in porta metus. Fusce semper mauris at orci maximus, id ultricies nisi cursus. Duis facilisis venenatis fringilla. Vestibulum finibus imperdiet rutrum. Aenean rutrum tincidunt libero. */
System.out.println("This is a sentence that should be outputed when the number is not less or equal than one");
if(number %2 == 0){
System.out.println("just to let you know that the number is even");
}else{
System.out.println("just to let you know that the number is odd");
}
return fibonacci2(number - 1) + fibonacci2(number - 2);
}
}