صدى الآهات Posted سبتمبر 17, 2007 Report Share Posted سبتمبر 17, 2007 بسم الله الرحمن الرحيم فتحتـ لكم موضوعـ جديد لهذه السنة منـ خلالـ هالموضوعـ يمكنكم مناقشة جميعـ المواضيع المتعلقة بمقرر cs102 ، ويمكنكم الاستفسار عن جميع ما يتعلق بهالمقرر، من اسايمنتات..واختبارات..شروحـ..الخ.. ويمكنكم الأستفادة من الموضوع السابق من خلالـ هذه الوصلة اضغطوا هنــــــا موفقين انشاء الله Link to comment Share on other sites More sharing options...
شيوخ@محرق Posted أكتوبر 2, 2007 Report Share Posted أكتوبر 2, 2007 write a program that sorts two arrays parallel, one includes students IDs and the other includes their names using the selection sort. Note: sort the two arrays according to students IDs ممكن تحلون هالاسايمنت انا حليته بس عندي غلط ماعرف شنو هو وشكرا مقدما Link to comment Share on other sites More sharing options...
شيوخ@محرق Posted أكتوبر 3, 2007 Report Share Posted أكتوبر 3, 2007 بل محد ساعدني بس معليه حبيت أحط الحل يمكن أحد يحتاجه... وشكرا لكم كلكم سوااء فكرتو في الحل أو مافكرتووو وهذي الحل:: #include <iostream> #include <string> using namespace std; int main() { int size=10; int i,j,min_index; long IDs[10],temp1; string names[10], temp2; for(i=0; i<size-1; i++){ min_index=i; for(j=i; j<size; j++) if(IDs[j]< IDs[min_index]) min_index=j; temp1=IDs[min_index]; IDs[min_index]=IDs; IDs=temp1; temp2=names[min_index]; names[min_index]=names; names=temp2; } return 0; } Link to comment Share on other sites More sharing options...
صدى الآهات Posted أكتوبر 3, 2007 Author Report Share Posted أكتوبر 3, 2007 عساج ع القوة شيوخ@محرق Link to comment Share on other sites More sharing options...
شيوخ@محرق Posted أكتوبر 3, 2007 Report Share Posted أكتوبر 3, 2007 تسلميــن حبيبتي Link to comment Share on other sites More sharing options...
شيوخ@محرق Posted أكتوبر 6, 2007 Report Share Posted أكتوبر 6, 2007 قوه ...... انا عندي اسايمنت 2 احد يبيه اذا تبونه بنزله مع الحل بس ردوو علي وانزله لكم Link to comment Share on other sites More sharing options...
فيض من الدموع Posted أكتوبر 7, 2007 Report Share Posted أكتوبر 7, 2007 شيوخ@محرق اي نزليه لين ما عليج امر خيتو Link to comment Share on other sites More sharing options...
شيوخ@محرق Posted أكتوبر 7, 2007 Report Share Posted أكتوبر 7, 2007 من عيوني ماطلبتي وهذي الحل:: (انشالله ماتأخرت عليج) #include <iostream> using namespace std; const size=20; void insertNewElement(int arr[], int newElement, int &length); void main( ) { int list={1,2,3,4,5,6,8,9,10,11|} int size=10; int newElement; cout<<" please enter value"; cin>>newElement; insertNewElement(list,newElement, size); } void insertNewElement(int arr[], int newElement, int &length){ int i=0,j; bool found= true; whilel(i<length && found) { if (arr>newElement) { for(j=length;j>i;j--) { arr[j]=arr[j-1]; } arr=nweElement; length++; found=false; } i++; } } Link to comment Share on other sites More sharing options...
فيض من الدموع Posted أكتوبر 8, 2007 Report Share Posted أكتوبر 8, 2007 مشكورة خيتو بس ممكن تحطين السؤال لأن كل سكشن يختلف السؤال انتي منو يدرسج؟ Link to comment Share on other sites More sharing options...
شيوخ@محرق Posted أكتوبر 8, 2007 Report Share Posted أكتوبر 8, 2007 انا رمزي يدرسني الاسايمنت مال التوتوريال بروبلم 3 Link to comment Share on other sites More sharing options...
Recommended Posts