Output The Fibonacci Sequence | C++ Example

  Рет қаралды 15,240

Portfolio Courses

Portfolio Courses

Күн бұрын

Пікірлер: 19
@tahawaseem6989
@tahawaseem6989 4 ай бұрын
I have an exam of programming fundamentals tomorrow, I have taken many of your tutorials and they have helped me a lot you are a life saver☺
@MegaByte-y4z
@MegaByte-y4z 22 күн бұрын
are u from pakistan
@tahawaseem6989
@tahawaseem6989 14 күн бұрын
Yes
@zish3655
@zish3655 2 ай бұрын
love u bro this was great, I was getting confused by having to deal with 3 variables.
@SallyNashwanDwaymeh
@SallyNashwanDwaymeh 3 ай бұрын
for (int i=0 ; i
@abdulhamidfayziyev9293
@abdulhamidfayziyev9293 2 жыл бұрын
I did not understand why did you initialize i to the 3?
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
Because the number of terms must be at least 3, otherwise we exit the program entirely. We output the first two terms 'manually' instead of using the loop because these two terms are "automatically" set.
@sohatufail3610
@sohatufail3610 10 ай бұрын
Sir why you assigned 0 to nextterm
@avnishkalyankar5247
@avnishkalyankar5247 10 ай бұрын
Because you need to initialise the variable nextTerm with some value. You can do that by initializing it with a 0.
@abdulhamidfayziyev9293
@abdulhamidfayziyev9293 2 жыл бұрын
Why not 0 or 1?
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
See my reply above.
@Mohan-mh1ew
@Mohan-mh1ew Жыл бұрын
Thank you so much i understood keep upload problems
@PortfolioCourses
@PortfolioCourses Жыл бұрын
You’re welcome, and I’m going to try to keep going! :-)
@hashimhamza7335
@hashimhamza7335 Жыл бұрын
Thank you so much
@PortfolioCourses
@PortfolioCourses Жыл бұрын
You’re very welcome! :-)
@webster_theking241
@webster_theking241 2 жыл бұрын
Please I want 100
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
The code is available here: github.com/portfoliocourses/cplusplus-example-code/blob/main/fibonacci.cpp. If you run it, and enter in 100, it should give you the first 100 terms. :-)
@muntahihossainsamin134
@muntahihossainsamin134 4 күн бұрын
@@PortfolioCourses I am getting negative integers for this case.
@AHMEDZPRO
@AHMEDZPRO 5 ай бұрын
thank you so much
Initialize A Vector With User Input | C++ Example
6:26
Portfolio Courses
Рет қаралды 9 М.
Fibonacci Series In Java With Recursion - Full Tutorial (FAST Algorithm)
15:11
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Computing the Fibonacci Sequence | C Programming Example
15:48
Portfolio Courses
Рет қаралды 13 М.
how Google writes gorgeous C++
7:40
Low Level
Рет қаралды 996 М.
Stepping Through Recursive Fibonacci Function
8:04
Khan Academy
Рет қаралды 214 М.
you will never ask about pointers again after watching this video
8:03
Selection Sort | C++ Example
9:49
Portfolio Courses
Рет қаралды 34 М.
#8.2-  احذر من الـ Recursion بمثال مع الـ Fibonacci Series
9:25
محمود سامي Hard-Code l
Рет қаралды 21 М.
Всё об указателях в C++ за 20 минут
20:00
What is the Fibonacci Sequence?
3:53
Wrath of Math
Рет қаралды 141 М.