- 3

Write a program that shows the following series?need help please??

1 1 2 2 4 7 11

26th Apr 2018, 1:37 PM
Gohar Zubair Khan
Gohar Zubair Khan - avatar
6 Answers
+ 2
Gohar Zubair Khan got my point from above comment?
26th Apr 2018, 4:53 PM
$Ā¢šŽā‚¹š”­!šØš“
$Ā¢šŽā‚¹š”­!šØš“ - avatar
+ 2
It resembles Fibonacci sequence.
26th Apr 2018, 1:45 PM
Disvolviĝo;
Disvolviĝo; - avatar
+ 2
#include <iostream> using namespace std; int main() { int previous = 0; int num = 1; while(num < 12) { cout << num << " "; int temp = num; num += previous; previous = temp; } return 0; } //output: 1 1 2 3 5 8 //umm. This is a little different.
26th Apr 2018, 1:55 PM
Disvolviĝo;
Disvolviĝo; - avatar
+ 2
ok it is very easy...it is Fibonacci series with some subtraction trick fibo : 1 1 2 || 3 5 8 || 13 21 34 ||55 sub : 0 0 0 || 1 1 1 || 2 2 2 || 3 new: 1 1 2 || 2 4 7 || 11 19 32 || 52 sub mean substraction.
26th Apr 2018, 4:48 PM
$Ā¢šŽā‚¹š”­!šØš“
$Ā¢šŽā‚¹š”­!šØš“ - avatar
+ 1
hey Gohar Zubair Khan could you please write more expansion of the series here? is it like below, 1 1 2 2 4 7 11 19 32 52
26th Apr 2018, 4:35 PM
$Ā¢šŽā‚¹š”­!šØš“
$Ā¢šŽā‚¹š”­!šØš“ - avatar
0
The Great Saga it's till 11. ..
26th Apr 2018, 4:37 PM
Gohar Zubair Khan
Gohar Zubair Khan - avatar