Jump to content
منتدى البحرين اليوم

مرام85

الاعضاء الفعالين
  • مشاركات

    1141
  • انضم

  • آخر زيارة

Everything posted by مرام85

  1. مشكورة اختي ع الصور الحلووووة
  2. الاخ ذابحنا من طلع من البرنامج للحين بموهبته ... مفكر حاله عبد الحليم زمانه والله كل شلخ لو هاي يصير فيالبرنامج جان كل واحد اشترك فيه من قبل قال نفس كلامه مافي الا هو .. ذابحنا بها التصريحات
  3. الف الف مبروك لنادر الفوز بلقب ستار اكاديمي 5 بصراحة اتمنيتها لـ محمد
  4. كل شي ولا مدام رولا وهي تصطنع المفاجئة صدقتين والله يستاهل نادر بس انا كنت اتمنى قويدر يفوز... بس كلش قويدر روحه مورياضية هههههههههههههه زعل حده ..
  5. ممكن مساعدة في حل هاي السؤال Write a named compare that takes 4 parameters , 2 pointers to arrays of integers, and to integers representing the number of elements in the 2 arrays. The function should return boolean value which is true if the arrays are equal and false otherwise. test your function in the main using diffrent arrays and checking the value returned by the function. notes: return false if the 2 arrays has diffrent sizes or the arrays have diffrent elements. use pointers to solve this problem. وهذا حلي شوفوا لي الخلل في الاجابة .......... #include<iostream> using namespace std; bool compare(int *p1, int *p2, int size1, int size2); void main() { int array1[5]={6,7,8,9,3}; int array2[5]={6,7,8,9,3}; int array3[4]={5,4,3,2}; int array4[4]={5,6,3,2}; compare(array1,array2,5,5); compare(array1,array3,5,4); compare(array3,array4,4,4); }; bool compare(int arr1[],int arr2[], int size1, int size2) { int *p1; int *p2; p1=arr1; p2=arr2; if(size1==size2) {for(int i=0;i<size1;i++) { if(*p1==*p2) {p1++; p2++;} else {cout<<"arrays are not equal"<<endl; return false; break;} } {cout<<"arrays are equal!"<<endl; return true;} } else {cout<<"the size is not equal!"<<endl; return false;} } بليييييييييز ابي الحل اليوم ضروري لا تطنشون
×
×
  • Create New...