SaRa ~
Well-Known Member
- تاريخ التسجيل
- 23 سبتمبر 2012
- المشاركات
- 96
- المجموعة
- أنثى
- الدفعة الدراسية
- معلومة خاصة
- التخصص
- ...
-
this is a function named RrmoveKey that takes as parameters an array of integers , the array's length (passed by reference) , and an integer key value that we want to remove . the function should search for the key in the array then remove it and decrease the length of the array .
السلام عليكم ورحمه الله وبركاته
جفت طرق ثانيه لحل السؤال بس ما ادري اذا ّي الطريقه صح او لا
ياريت احد يعلمني
this is a function named RrmoveKey that takes as parameters an array of integers , the array's length (passed by reference) , and an integer key value that we want to remove . the function should search for the key in the array then remove it and decrease the length of the array .
HTML:
void RemoveKey ( int list[] ; int &size ; int key ){ for ( int i=0 ; i<size ; i++ ) if ( list[i]==key ) { for ( int j=i ; j<size-1 ; j++ ) list[j]=list[j+1] size -- ; break ; }
cout<<" Key not Found !! " ;
}
السلام عليكم ورحمه الله وبركاته
جفت طرق ثانيه لحل السؤال بس ما ادري اذا ّي الطريقه صح او لا
ياريت احد يعلمني






