السلام عليكم .. قبل فترة خلصنا من الميثود .. والحمدلله كنت فاهمها تمام ..
لكن ارجو مساعدتي في حل هالسؤال عن (( المصفوفات )) .. أو على الأقل بدايته اذا كان طويلاً ..
لأن المصفوفات معقده جداً .. ووجدت صعوبه في فهمها الى الآن .. فحل هالسؤال بيساعدني كثير في فهمها ان شاء الله ..
جزاكم الله خير الجزاء :
Write a program that reads an integer n, then declares an array of n elements. The program then calls a method that fills the array with the first n Fibonacci numbers. Then main reads a list of numbers less than n that denote the position of a number and calls another method that uses the array to return the Fibonacci number in that position. Main stops when a negative number is read.
Sample Run:
Enter an Enteger :
4
Enter the position (less than the length then enter -1 when finished)
3
The fibonacci number at position 3 is : 2
Enter the position (less than the length then enter -1 when finished)
4
wrong value, exit
تم تعديل هذه المشاركة بواسطة S Y L A R في 21 مايو 2010 في 02:33




