السلام عليكم
ممكن تعلموني كيف اكتب برنامج يعطيني الآتي:
fibonacci (italian mathematician) discovered the following series
:
1,1,2,3,5,8,13,21,34,55,89
as you see each next number is the sum of previous two numbers (except the first two numbers)
write a complete C++ program to compute the first 88 numbers of this series, and print then 5 numbers per line
يعني يجمع كل رقمين متتالين ويضعهم .. ثم يجمع الرقم الآخير مع قبل الأخير ويضعهم وهكذا كما ترا في المثال ويضعهم كل 5 ارقام في سطر .... طبعا آخر سطر سوف يحتوي على 3 ارقام فقط لان المجموع 88 رقم.....
وشاكر لكم حسن تعاونكم