quiz حل الأسئلة الجامعية manage_search الأرشيف

تم الحل ✓
categoryبرمجة وتطوير البرمجيات schoolبكالوريوس event_available2026-07-15

السؤال

Transcribed Image Text:

(a) (16pts): The Fibonacci sequence is a series where the next term is the sum of pervious two terms. The first two terms of the Fibonacci sequence is 0 followed by 1. The Fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144............................ Write a program to output the Fibonacci sequence up to a given number by a user. Your program should verify the user's input as a positive integer. Sample output #1: Enter a number: 90 Fibonacci Series: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 Sample output #2: Enter a number: -9 Invalid input please try a positive integer.

check_circle الجواب — حل مفصل خطوة بخطوة

hourglass_top