المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : المرحلة الجامعية لو سمحتوا ساعدوني



رورو محد قدها
14-10-2005, 04:13 PM
طلب عاجل الى خبراء البرمجة بc++
انا طالبة في الجامعة واريد حل لهذين البرنامجين لاني عجزت عن حلهما والتسليم ضروري يوم السبت ارجو المساعدة
1)البرنامج الاول:
ashuffle is the opposite of asort,in that it attempts to destroy any order that exits in an array . write afunction shuffle() to shuffle the elements in an int array.to begin select an element at random and exchange it with element 0;element 0 is now shuffled.select one of the unshuffled elements at random and exchange it with element 1;element 0 and 1 are now shuffled.continue in the same way until allelements are shuffled.for the random selections it will help to have afunction rand_m_to_n() that returns arandom integer in the range m to n.
write aprogram that first reads in an unsorted array of integers(ask the user how many integers he wants to enter).then it sorts the array(using any sorting algorithm) then it shuffles the elements in the array.both the sorted and shuffled arrays shoud be printed as output
البرنامج الثاني:
write aprogram the reads in 20 numbers,each of which is between 10 and 100,inclusive.as each number is read,print it only if it is not a duplicate of anumber already read.provide the worst case in which all 20 numbers are different.use the smallest possible array to solve this problem.

zaid DCC
14-10-2005, 06:17 PM
والله حظك لأنك قاعدة تتعلمين لغة سي بلس بلس .. انا كان ودي اتعلمه من زمااااااان
عشان اصمم لعبة ار بي جي :p