السلام عليكم ..
:)
كيفكم .. ان شاء الله بخير ..
عندي واجب مكون من 3 اسأله .. والصراحه مو فاهمه المطلوب بالضبط منها ..
وعندنا الدكتوره ماتعطينا معنى السؤال ..
اللي يقدر يساعدني .. الله يجزاه خير ..
:blush:
هذي الاسئله ..
(1)
Write a program that reads an integer n then read n characters. The program must form 3 strings : the first composed of the alpha characters, the second composed of the digits, and the third composed of all other characters. Read n in main, then read each character and call one of three overloaded methods to form the strings.
(2)
Write a program that reads x and calls 2 methods to calculate y and z if:
y = x – x/2 + x/3 – x/4 …
z = x – x/2! + x/3! - …
main prints y and z.
(3)
Write a program that reads an integer n and calls a method that calculates and prints the nth member of the series that has 1st three members : 0 1 1 and nth member is the sum of the previous 3 members.
Write a program that reads the value of a class data member n and then calls a void method that prints a diamond of n lines; the method receives nothing.
واحتاج السؤال الثالث اكثر شي ..
:)
