السلام عليكم ورحمة الله وبركاته
جئت لهذا المنتدى واتمنى تساعدوني
احد صديقاتي تدرس بالحاسب الالي وعندها واجب وبسبب غيابها لان عندها ضروف
لازم تسلمه الاحد يعني بكرا وماعندها نت وطلبت مني ادور لها حل لهالاسئله وبصراحه انا ماعندي خبره بالبرمجه يعني توني باللينكس :P توني مادرست السي بلس بلس قلت انزله بهالمنتدى
اتمنى تساعدوني وتحلونه عشان اعطيها بكرا الحل بالجامعه
حاولوا بالي تقدرون بلييييييييز ابي اساعدها .
وهذه الاسئله
Exercise #1 Write a recursive function that receives a number, then determines whether number is prime or not.
Output screen
Enter Number : 8
It is not prime
********
Exercise2: Write a recursive function that determine the length of a given integer number. (e.g. the length of 123 is 3, length of 9561 is 4 and so on).
Enter a number 2343
The length of 2343 is 4
**********
Exercise3: There are 9870 people in a town whose population increases by 10% each year; write a recursive function that computes how many years it would take for the population to exceed 30000.
Output screen
Population will reach 30000 after 12
*********
Exercise4: Write a recursion function that computes and prints the value of ex by using the formula: Y = 1 + x + x2 + x3 +….....+ xn
Output screen
Enter x: 2
Enter n: 5
Result = 63
