Aya alsalam

الأعضاء
  • المساهمات

    5
  • تاريخ الانضمام

  • تاريخ آخر زيارة

السُّمعة بالموقع

1 Neutral
  1. السلام عليكم ارجو حل هذا السؤال Write a C++ function (call it search) that searches for a number in the array, that is passed to the function, and returns the index/indices of the number in that array. For example, if you pass [5,6,8,9,5,2] to the function and you want to search for 5 the function returns [0,4]. Write a C++ program and test your function. Take the following notes into consideration when writing your program: 1- Let the user decide the size of the array and then enter the array elements. 2- Your function should work with any data type. 3- Use pass by address when passing the array to the function. 4.The function should prevent changing the elements of the passed array.
  2. اشكرك جزيل الشكر
  3. اشكرك اخي جزيل الشكر
  4. السلام عليكم هذا السؤال لاحظت وجوده ظمن الاسئلة المرسلة من قبل الاعضاء ولكن هل يمكنكم مساعدتي بالحل بطريقة جديدة افيدوني رجائاً Write a Name_pairs class holding three members (name, age, size) where name is an array of strings, age is an array of ints, and size is the size of name and age arrays. Write a destructor and constructor that accepts one input argument which the size. Provide an input operation (method) read_names that reads a series of names. Provide a read_ages operation that prompts the user for an age for each name. Provide a print operation that prints all the (name[i], age[i]) pairs (one per line) in the order determined by the name array. Provide a sort operation that sorts the name array in alphabetical order and reorganizes the age array to match. Create a C++ program and let user enter 5 names and ages and then use print method to print them. Sort the name array and print it again.