الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

ممكن مساااااااااااااااااااااعده

مغلق
بدأه أسيرة في قلب دامع في 9 نوفمبر 2006 · 1 رد · 420 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

سلااااااااااااااااااااام

الله يعااااااااااااااااااااااافيكم ابغى حل لهذه البرامج ضروري وقبل يوم السبت ضروري وشكرا

Write program with the following functions

:

bool prime (int);

that returns true if parameter is divisible only 1 and by itself.

bool perfect (int);

That returns true if parameter is perfect integer :if the sum of its factors including 1(but not the number itself )is equal to the number .

Int GCD (int,int); //seen in the first Lab

These functions are invoked in the main function .Here two integers are read and only necessary functions are called (not always all).

*****************************************

Bonus

Write a program with the following steps:

Read an integer.

Outputs this integer with its digits reversed.

EX: input=1427 Output=7241

***************************************

Write C++ statements that performs the specific task .Each question should use the result of the previous one .

1-Declare an array NUMBER of 10 double elements ,and

initialize it to 0.0,1.1,……9.9

2-Declare a pointer nptr to point to a double value.

3- Print array number 'using subscript notation.

4-Write two separate statements that each assign the starting

address of NUMBEFR to nptr.

5- Print elements of NUMBER using pointer /offset notation with nptr.

Pointer /offset notation with array name ،، ،، ،، ،، ،،6-

Pointer /subscript not،، ،، ،، ،، ،،7-

8- Verify how many bytes your compiler allocates to double variables.

9- Assume that nptr points to the beginning of the array , what address is referenced by nptr+8 ? what is its content ?

******************************************

هذا الموضوع مغلق.

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…