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

[مخالف - عنوان غير مناسب :]ميييين يعرف؟

مغلق
بدأه زليخة في 25 مايو 2009 · 3 رد · 437 مشاهدة · في ارشيف قسم C/C++
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

اذا احد يقدر يساعدني في حل هذا

#include <iostream.h>

const int size = 10;

class list

{

private:

int data;

int count;

public:

list()

{

count = 0;

}

void addback(int newitem)

{

data[count]= newitem;

count++;

display();

}

void deleteback()

{

count --;

display();

}

void display()

{

cout<<"\n----------\n";

for (int i = 0; i<count; i++)

cout<<data;

cout<<"\n----------\n";

}

void display_menu()

{

cout<<"\n choose number\n 1) add\n 2) delete\n 3) display\n 4)quit\n";

}

};

void main()

{

int choice, new_num;

list l1;

l1.display_menu();

cin>> choice;

while(choice != 4)

{

switch(choice)

{

case 1: cout<<"Enter number";

cin>> new_num;

l1.addback(new_num);

break;

case 2: l1.deleteback();

break;

case 3:

l1.display();

break;

}

l1.display_menu();

cin>> choice;

}

}

_________________________________________________________________

draw flowchart and write code to add new functions to:

1) sort the list

2) find the maximum number

وهذا

a) Modularize the following code:

#include <iostream>

using namespace std;

int main()

{

int x; // base

int y; // exponent

cout << "Enter the first integer: "; // prompt for x

cin >> x; // input base

cout << "Enter the second integer: "; // prompt for y

cin >> y; // input exponent

//find the x to the power of y

int i; // counts from 1 to y

int power; // used to calculate x raised to power y

i = 1; // initialize i to begin counting from 1

power = 1; // initialize power

// count from 1 to y and multiply power by x each time

while ( i <= y )

{

power *= x;

i++;

} // end while

cout <<"x to the power of y = " <<power << endl; // display result

// find the product of x and y

int product;

product = x * y;

cout <<"x * y = " << product<< endl; // display result

// find the average

int average;

average = product / 2;

cout <<"The average is: " << average<<endl; // display result

return 0; // indicate successful termination

} // end main

B) Create the Hierarchy Chart for (a)

وشكررررررررررا :wub:

#2

ساعدووووووووووني بلييز :(

#3

اذا ممكن توضيح اكتر

بعدين المعدل نوجده عن طريق جمع المتغيرات مو ضربها

سبحانك لا علم لنا إلا ما علمتنا إنك أنت العزيز الحكيم

#4

الأخ الكريم/الأخت الكريمة

السلام عليكم ورحمة الله وبركاته

مرحباً بكم في منتدى الفريق العربي للبرمجة

تأسف إدارة المنتدى لغلق الموضوع وذلك لمخالفته قوانين المشاركات. فقرة اختيار عنوان مناسب لمحتوى الموضوع.

قواعد طرح المشاركات

/index.php?showtopic=29343

شاكرين لكم حُسن تعاونكم

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

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

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

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

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

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