صفحة 7 من 10 الأولىالأولى ... 2345678910 الأخيرةالأخيرة
النتائج 91 إلى 105 من 148

الموضوع: من يريد مساعدة في ال c++

  1. #91
    التسجيل
    17-03-2007
    المشاركات
    9

    رد: من يريد مساعدة في ال c++

    اقتباس المشاركة الأصلية كتبت بواسطة علي جنيدي مشاهدة المشاركة
    أخ fazzaa كرمال عيونك يكرم مرج عيون وبدل الطلب طلوب مليون .
    تسلم اخوووي والله يعطيك الصحة والعااافية وطولت العمر ..

    ولك مني مليوووون تحية ..

    بس يااار يت تخلصه قبل السبت

  2. #92
    التسجيل
    15-02-2007
    المشاركات
    298

    رد: من يريد مساعدة في ال c++

    كود PHP:
    #include<iostream.h>
    #include<fstream.h>
    #include<stdlib.h>
    #include<iomanip.h>
    #include<stdio.h>

    struct string
    {
     
    char buffer[10] ;
    };
    void loadFilestring [] , int ) ;
    void readPhrases string [] , int ) ;
    void searchBufferstring [] , int char []  , int ) ;
    void updateStatschar [] , int int ) ;
    void displayStatsvoid ) ;

    main()

     
    //char Phrases[10];
     //int occurances ;
     
    const int size 100 ;
     
    string buffer[size] ;
     
    ifstream inClientFile"stats.dat" ios::trunc ) ;
     
    loadFilebuffer size ) ;
     
    readPhrasesbuffer size ) ;
     
     
    displayStats();
     return 
    0
    }
    void loadFilestring buffer[] , int size )
    {
     
    char filename[10] ;
     
    cout << "Enter the name of the inpot file" << endl ;
     
    cin >> filename ;
     
    ifstream inClientFilefilename ios::nocreate) ;
     
     if( !
    inClientFile)
     {
      
    cout << "File could not be oppened" << endl ;
      exit(
    1) ;
     }
     
     for( 
    int i size i++ )
      
    inClientFile >> buffer[i].buffer ;
     
    cout << endl ;
    }
    void readPhrasesstring buffer[] , int size )
    {
     
    char Phrases[10] ;
     
     
    cout << "Enter a phrase ( Enter empty phrase to quite the program ) " << endl ;
     while((
    cin >> Phrases) && (Phrases[0] != '\f'))
     {
      
    searchBufferbuffer size Phrases 10 ) ;
      
    cout << "Enter a phrase ( Enter empty phrase to quite the program ) " << endl ;
     }
    }
    void searchBufferstring buffer[] , int size ,  char Phrases[] , int n )
    {
     
    bool found true ;
     
    int occurances ;
     for(
    int i 100 i++ )
     {
      for (
    int  j 10 j++ )
       if( 
    Phrases[j] != buffer[i].buffer[j] )
        
    found false ;
       if ( 
    found )
        
    occurances ++ ;
     }
     
    cout << " ( " << occurances << " occurances found ) " << endl << endl ;
     
    updateStatsPhrases 10 occurances ) ;
    }
    void updateStatschar Phrases [] , int size int occurances 
    {
     
    ofstream outClientFile"stats.dat" ios::ate ) ;
     
    outClientFile << Phrases << " " << occurances << endl ;
    }
    void displayStats() 
    {
     
    char Ph[10] ;
     
    int occ ;
     
    ifstream inClientFile"stats.dat" ios::in ) ;
     while( 
    inClientFile >> Ph >> occ ) ;
     
    cout << Ph << "     " << occ << endl;
    }
      
     
    اضغط CONTROL Z لانهاء ادخال المصطلحات
    وأنا لم أجرب البرنامج
    :
    العملي دون النظري عمل أعمى والنظري دون العملي عمل ليس له فائدة

  3. #93
    التسجيل
    03-01-2005
    المشاركات
    1,964

    رد: من يريد مساعدة في ال c++

    مرحبا مجددا ..
    احم ..هالمرة ساطلب من بعد اذنك طبعا ...أن تساعدني بحل الواجب ,ليس تكاسلا مني وانما لظروف مرضية ألمت بي ,جعلتني ألازم البيت الأسبوع الماضي ولم أعلم بالواجب الا أمس , وعنا امتحانات ..
    الواجب
    given file "text.text"where each line contains the adress of each studant <write a complete program to print the shortest adress in this file

    انتهى

    وشكرا لك

  4. #94
    التسجيل
    16-04-2005
    المشاركات
    30

    رد: من يريد مساعدة في ال c++

    السلام عليكم اذا ممكن ابغى برنامج يخفي نص داخل نص اخر

    مثال لو كان عندي كلمة hello كلمه مكتوبه وأريد إخفاء حرف ال i ليكون هو الرساله المشفرة فانه يفترض ان اكون قد انشئت قاموس يحتوي على الكلمات المرادفه لهذه الكلمه مثال Hi فيقوم الكمبايلر بالبحث في المرادفات ليجد الكلمه المناسبه للاخفاء وهي hi إذ أن الحرف الثاني هو حرف ال i فيتم اخفاء الحرف وارسال كلمة hi

  5. #95
    التسجيل
    15-02-2007
    المشاركات
    298

    رد: من يريد مساعدة في ال c++

    [PHP]
    #include<iostream.h>
    #include<fstream.h>
    #include<stdlib.h>
    struct string
    {
    char add[20] ;
    };
    main()
    {
    ifstream inAddressFile("text.text" , ios::nocreate ) ;
    if(!inAddressFile)
    {
    cout << " file could not be opend " << endl ;
    exit(1);
    }
    string address[100] ;
    int acc[100] ;
    char addr[20] ;
    int i = 0 , counter = 0 ;
    while( inAddressFile >> addr )
    {
    inAddressFile >> address[i].add ;
    i++ ;
    }

    for( int j = 0 ; j < i ; j++ )
    cout << address[j].add << endl ;
    for( j = 0 ; j < i ; j++ )
    {
    counter = 0 ;
    for( int k = 0 ; k < 20 ; k++ )
    {
    if( (int) address[j].add[k] == 0 )
    break;

    counter++ ;
    }
    acc[j] = counter ;
    cout << counter << endl ;
    }

    int possition = 0 ;
    int min = 0 ;
    for( j = 0 ; j < i ; j++ )
    if( acc[j] > min )
    possition = j ;
    cout << " The shortest address is " ;
    cout << address[possition].add << endl ;

    return 1 ;
    }
    [PHP/]
    العملي دون النظري عمل أعمى والنظري دون العملي عمل ليس له فائدة

  6. #96
    التسجيل
    16-04-2005
    المشاركات
    30

    رد: من يريد مساعدة في ال c++

    الله يخليك احتاجه رروري

  7. #97
    التسجيل
    15-02-2007
    المشاركات
    298

    رد: من يريد مساعدة في ال c++

    البرنامج السابق لرابعة أما من ناحية برنامجك فيوجد واحد مشابه من صنعي قي معرض يرامج الأعضاء
    العملي دون النظري عمل أعمى والنظري دون العملي عمل ليس له فائدة

  8. #98
    التسجيل
    16-04-2005
    المشاركات
    30

    رد: من يريد مساعدة في ال c++

    السلام عليكم اخ علي انا شفت البرنامج هو مو نفس اللي ابغاه بس ممكن استفيد منه اذا ممكن بس تعطيني الكود حقه

  9. #99
    التسجيل
    12-04-2007
    المشاركات
    5

    رد: من يريد مساعدة في ال c++

    السلام عليكم ورحمة الله وبركاته

    ممكن أحد يساعدني بشرح هالبرنامج عن ايش يتكلم؟؟
    ملا حظه انا ما درست لغة c انا ادرس c++ ومطالبه بهالبرنامج وانا ما فهمته!!!
    التعديل الأخير تم بواسطة ضوء القـمـر ; 13-05-2007 الساعة 09:26 PM

  10. #100
    التسجيل
    12-04-2007
    المشاركات
    5

    رد: من يريد مساعدة في ال c++

    البرنامج بالمرفق

    جزيت خيرا
    الملفات المرفقة الملفات المرفقة

  11. #101
    التسجيل
    15-02-2007
    المشاركات
    298

    رد: من يريد مساعدة في ال c++

    هذا هو الرنامج بعد ما صلحت الأخطاء فيه
    تريدين شرح كيف يعمل أم شرح ماذا يعمل
    كود PHP:
    //The following program implements the Bellman-Ford algorithm in C.
    #include <limits.h>
    #include <stdio.h>
    #include <stdlib.h>
    /* Let INFINITY be an integer value not likely to be
       confused with a real weight, even a negative one. */
    #define INFINITY ((1 << 14)-1)
    typedef struct 
    {
        
    int source;
        
    int dest;
        
    int weight;
    Edge;
    void BellmanFord(Edge edges[], int edgecountint nodecountint source)
    {
        
    int distance[10] ;
     
    distance[0] = (int) malloc(nodecount sizeof(distance));
     
        
    int ij;
        for ( 
    nodecount ; ++)
          
    distance[i] = INFINITY ;
        
    distance[source] = ;
        for (
    i=0nodecount; ++i
     {
            for ( 
    edgecount ; ++j
      {
                if ( 
    distance[edges[j].source] != INFINITY 
       {
                    
    int new_distance distance[edges[j].source] + edges[j].weight ;
                    if ( 
    new_distance distance[edges[j].dest] )
         
    distance[edges[j].dest] = new_distance ;
                }
            }
        }
        for ( 
    edgecount; ++)
     {
            if ( 
    distance[edges[i].dest] > distance[edges[i].source] + edges[i].weight 
      {
                
    puts"Negative edge weight cycles detected!" ) ;
                
    //free( distance ) ;
                //return ;
            
    }
        }
        for ( 
    nodecount ; ++)
     {
            
    printf("The shortest distance between nodes %d and %d is %d\n " source distance[i] ) ;
        }
        
    //free( distance ) ;
        //return ;
    }
    int main(void)
    {
        
    /* This test case should produce the distances 2, 4, 7, -2, and 0. */
        
    Edge edges[10] = {{0,15}, {0,28}, {0,3, -4}, {1,0, -2},
                          {
    2,1, -3}, {2,39}, {3,17}, {3,42},
                          {
    4,06}, {4,27}};
        
    BellmanFord(edges1054);
        return 
    0;

    العملي دون النظري عمل أعمى والنظري دون العملي عمل ليس له فائدة

  12. #102
    التسجيل
    14-05-2007
    المشاركات
    11

    رد: من يريد مساعدة في ال c++

    السلام عليكم

    ياليت أخوي تحل لي هالسؤال واذا في إمكانية تشرحه لأني ضااااايع بالجزئية هذي مرررره
    الملفات المرفقة الملفات المرفقة

  13. #103
    التسجيل
    24-12-2004
    المشاركات
    14

    رد: من يريد مساعدة في ال c++

    السلام عليكم
    أرجو مساعدتي في كتابة البرنامج باستخدام array...
    1- print a dimentional array that print even numbers
    2-reverse the dimentional
    3- print each raw in reverse order
    و جزاكم الله خيرا...

  14. #104
    التسجيل
    15-02-2007
    المشاركات
    298

    رد: من يريد مساعدة في ال c++

    هذا هو الحل للأخ the pluky
    بقي عليك اضافة class وإذا وجد شيء لم تفهمه فأنا جاهز
    #include<iostream.h>
    #include<stdlib.h>
    /*class Arrays
    {
    public :
    float data[5] ;
    };*/
    void printarray ( float [] , int ) ;
    void BubbleSort ( float [] , int ) ;
    void SelectionSort ( float [] , int ) ;
    void swap ( float * , float * ) ;
    float array[5] = { 4 , 2 , 1 , -1 , -2 } ;
    const int arraysize = 5 ;
    int main()
    {
    while(1)
    {
    int choise ;

    cout << " 1.read the array." << endl
    << " 2.Bubble sort. " << endl
    << " 3.Selection sort. " << endl
    << " 4.Exit. " << endl ;
    cin >> choise ;
    switch(choise)
    {
    case(1):
    {
    printarray( array , arraysize ) ;
    break ;
    }
    case(2):
    {
    BubbleSort( array , arraysize ) ;
    break ;
    }
    case(3):
    {
    SelectionSort( array , arraysize ) ;
    break ;
    }
    case(4):
    {
    exit(1) ;
    break ;
    }
    }
    }
    return 1 ;
    }
    void printarray ( float array[] , int arraysize )
    {
    for(int i = 0 ; i < arraysize ; i++)
    cout << "array[" << i << "]= " << array[i] << endl ;
    cout << endl ;
    }
    void BubbleSort ( float array[] , int arraysize )
    {
    bool swapped ;
    do
    {
    swapped = false ;

    for( int i = 0 ; i < arraysize - 1 ; i++ )
    {
    if( array[ i ] > array[ i + 1 ] )
    {
    swap( & array[ i ] , & array[ i + 1 ] ) ;
    swapped = true ;
    }
    }

    }
    while ( swapped ) ;
    }
    void swap ( float * element1 , float * element2 )
    {
    float hold ;
    hold = *element1 ;
    *element1 = *element2 ;
    *element2 = hold ;
    }
    void SelectionSort ( float array[] , int arraysize )
    {
    float max = array[ 0 ] ;
    float max_pos = 0 ;
    for ( float i = arraysize ; i > 0 ; i -- )
    for ( int j = 0 ; j < i - 1 ; j++ )
    {
    if ( array[ j ] > max )
    {
    max = array[ j ] ;
    max_pos = j ;
    if ( i != max_pos )
    swap ( &i , &max_pos ) ;
    }

    }
    }
    العملي دون النظري عمل أعمى والنظري دون العملي عمل ليس له فائدة

  15. #105
    التسجيل
    12-05-2007
    المشاركات
    1

    رد: من يريد مساعدة في ال c++

    السلام عليكم و رحمة الله و بركاته ...
    أذا يمكن أخي اريد كود للبحث في ملف عن الكلمات التي عدد أحرفها 3 أحرف و الناتج يخرج لنا عدد هذه الكلمات ....

    أذا يمكن في أقرب فرصة و لك جزيل الشكر ...

صفحة 7 من 10 الأولىالأولى ... 2345678910 الأخيرةالأخيرة

ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •