ويش هو السؤال ؟السلام عليكم والرحمة
سكشن 3 :tears:
اذا ماعليكم امر
من منكم فهم الجزء الأخير من الأساينمت
ياريت الي سواه يفهمني شسالفة ؟!!:mellow:

اي عارفة ان اذا الأري فيها 2 كي و نبي الأخير لازم نبحث من النهاية و اذا حصله يسوي الازم بعدين بريك
بس بما انه الأخ kaito kid قال ما يحتاج بريك فرضت انه الأري ما فيها الا كي واحد
![]()
for( int i=size-1;i>0;i--)
for( int i=0;i<size;i++)

كنت متخربطة بين جهة اليمين و اليسار
اني سويتها بفور لوب وحدة
لأن بما انه بيمسح من النهاية اذا بس نسوي ليه سايز-- لين ما يوصل للكي
صح تفكيري لو غلط !!!
كود:for( int i=size-1;i>0;i--) if ( arr[i]==key ) pos=i; for (int j=size-1; j>pos; j-- ) size-- ;
صح
عن الكلاسvoid DEL(int arr[],int pos,int& len,int f)
{
int ii=0;
while(ii<f)
{
for(int i=pos;i<len;i++)
arr[i]=arr[i+1];
len--;
ii++;
}
}

^^
الفكرة في شي واحد بس
هي تغيير مكان الحذف
خله pos-1
عشان تغير المكان اللي يسوي فيه shift
^^^
طريقة أخرى
بس طريقة سيد حسين أسهلكود:arr[i-1]=arr[i];
تحياتي
وكل فكره احلى من الثانيه 
q)))write a class called date ;it has three integer day;month;and year.it has the following functions
1)constructor with default vaules parameters.
2)one set and three gets.
3)print to print the month in dd\\mm\\yy or mm\\dd\\yy pass flag to choose which format.
4)IsEqual to compare two dates .
5) days that return the number of days for a given month.
6)Dname that return the date name i.e sunday ;monday....
7)private function called check to make sure the date is correct .it should be used by set and the constrtuctor ;if the day is invalid make the date as 1\1\2000.
****Implement the following function
A)))constructor/
B)))check
class Date]
}
private:
int y;
int m;
int d;
bool (check(;
public:
Date(int yy=1,int mm=1,int dd=2000);
void set (int yy,int mm, int dd);
int get y();\\or void get y(int&)
int get m() ;
int get d();
void print (bool f);
bool IsEqual (const Date &D);
int day();
string Dname();
;{
Date::Date(int yy, int mm int dd);
}
y=yy;
m==mm;
d==dd;
{;
Date::IsEqual ( const Date &D)
}
found=false
if(y=D.yy&&m==D.mm&&d==dd)
return true:
مسامحة بحريني,,
عندي عفسة شوي,,
حتى أكثر من PM ما رديت عليهم للحين,,
الخطوات,,
افتح البرنامج,,
و اضغط
File
New
Project
بتحصل أكثر من خيار على اليسار,,
تحت الخيار
Visual c++
تحصل كلمة
Win32
اضغطها,,
و في الويندو اللي على اليمين, بتحصل,,
Win32 Console Application
حط الاسم في الفراغ تحت,,
و اضغط OK
بعدين بتفتح لك وندو جديدة,,
Next
اختار Empty project
اضغط Finish
بعدين على اليسار, بتحصل أشكال فولدرات,,
Header Files
Recorses Files
Source Files
اضغط في الفراغ رايتن كليك,,
و اضغط
Add
New Item
على اليسار اختار Code
و في اليمين, اختار
Sorce File (.cpp)
و اختار ليه اسم,,
و اضغط OK
و اكتب برنامجك,,
و اذا خلصت منه,,
اضغط
Debug
Start without debugging
أو اضغط CTRL + F5
ِشكراً سيدنا .. ،
الحين صار صح .. بس الايرور زادوا.. 12 .. كانوا ولا واحد .. > يمكن لأن كان غلط !!

حاضرين,,
المشكلة جذي في البرنامج يعني
جوفي وين الأخطاء,
و حاولي تعدلينهم
void input_points (point_type PTS [], int NBPTS )
for ( int i=0 , i<NBPTS , i++ )
{
cin >>NBPTS [i];
}
for (int j=0,j<PTS , j++)
{
cin >> PTS[j];
}
for ( int x=0, x< ) ------------
NBPTS [x]=PTS [x];
محد يقدر يشوف حلي صح لو لا:mellow:وال check ماعرفتها لو توضحون لييPHP:class Date] } private: int y; int m; int d; bool (check(; public: Date(int yy=1,int mm=1,int dd=2000); void set (int yy,int mm, int dd); int get y();\\or void get y(int&) int get m() ; int get d(); void print (bool f); bool IsEqual (const Date &D); int day(); string Dname(); ;{ Date::Date(int yy, int mm int dd); } y=yy; m==mm; d==dd; {;
في بعد سوال ماحطيته تابع ليه
تبع الامبلمنت
للفنكشن IsEqua
lPHP:Date::IsEqual ( const Date &D) } found=false if(y=D.yy&&m==D.mm&&d==D.dd) return true:
وفي شي ثاني ماعرفته تابع لنفس السوال :::::
create a main program with array of object of size 366 . set each date to the days of the year starting with 1\1\2010
***print the Date of the first friday in every month.
وماتقصرون............

محد يقدر يشوف حلي صح لو لا:mellow:
ويوضح ليي اللي ماعرفته![]()
:والله لو أعرف يا خوك ساعدتك .. بس الحالة عصيبة ..
إنتظر ليما يجي سيد حسين ..


:
مشكور يالطيب
جاري الانتظار![]()
# include <iostream>
using namespace std;
class Rectangle
{
private :
float length;
float width;
private :
Rectangle ();
void setrectangle (float , float )
void getrectangle (float& , float&)
void findarea(float&,float&);
void display();
~Rectangle ();
};
int main ()
{
Rectangle myrectangle;
myrectangle.setrectangle(5,2);
myrectangle.findarea();
myrectangle.display();
}
return 0;
Rectabgle::Rectangle ( float len , float wid )
{
length=len;
width=wid;
}
void setrectangle::Rectangle (float len , float wid )
{
length=len;
width=wid;
}
void getrectangle::Rectangle (float& len , float&wid)
{
len=length;
wid=width;
}
void findarea::Rectangle(float& len , float&wid)
{
return length*width;
}
void display()
{
cout<<"The length of the rectangle="<<length<<"The width of the rectangle="<<width;
}
Rectangle::~Rectangle ()
{
cout << " Rectangle object Terminated ";
}