subject

Se consideră şirul Fibonacci, definit astfel: f1=1 , f2=1 , fn=fn-1+fn-2 , dacă n>2.CerinţaSe dă un număr natural n. Să se afişeze în ordine crescătoare, primii n termeni ai şirului lui Fibonacci. Date de intrareProgramul citește de la tastatură numărul n. Date de ieşireProgramul afișează pe ecran primii n termeni ai şirului lui Fibonacci, în ordine crescătoare, separați printr-un spaţiu. Restricţii şi precizări1 ≤ n ≤ 40ExempluDate de intrare5Date de ieșire1 1 2 3 5

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:50
What is the difference between windows 7 and windows 10?
Answers: 1
question
Computers and Technology, 24.06.2019 14:00
Which describes careers that have similar education requirements but different qualifications? product safety engineers and materials engineers industrial safety engineers and industrial health engineers quality control systems managers and inspectors industrial safety and health engineers and hand packers
Answers: 3
question
Computers and Technology, 24.06.2019 18:20
Acommon algorithm for converting a decimal number to binary is to repeatedly divide the decimal number by 2 and save the remainder. this division is continued until the result is zero. then, each of the remainders that have been saved are used to construct the binary number.write a recursive java method that implements this algorithm.it will accept a value of int and return a string with the appropriate binary character representation of the decimal number.my code: public class lab16{public string converttobinary(int input){int a; if(input > 0){a = input % 2; return (converttobinary(input / 2) + "" +a); } return ""; } }
Answers: 1
question
Computers and Technology, 25.06.2019 05:00
Brad wants to buy flowers for his friend with 33 dollars.the daisies are 1 dollar each and the roses are 2 dollars each he buy 3 more daisies than roses how much did the roses cost
Answers: 2
You know the right answer?
Se consideră şirul Fibonacci, definit astfel: f1=1 , f2=1 , fn=fn-1+fn-2 , dacă n>2.CerinţaSe dă...
Questions
question
Mathematics, 20.11.2019 06:31
question
Mathematics, 20.11.2019 06:31
question
Mathematics, 20.11.2019 06:31
question
Mathematics, 20.11.2019 06:31
Questions on the website: 13722362