/i/Acil

  1. 1.
    0
    #include <iostream>
    4. include <string.h>
    5. include <stdio.h>
    6. include <cstring>
    using namespace std;
    int main(){int i,j,gecici1,ogrencinotu[5];
    char ogrenciadi[5], gecici2[5];

    for(int a=0;a<5;a++){
    cout<<"Ogrencinin adi ve soyadi : "; gets(ogrenciadi );
    cout<<"Ogrencinin notunu giriniz: "; cin>>ogrencinotu[a];}
    for(i=0;i<5;i++)
    for(j=0;j<5;j++)
    if(ogrencinotu[j] < ogrencinotu[i]){gecici1=ogrencinotu[i];
    ogrencinotu[i]=ogrencinotu[j];
    ogrencinotu[j]=gecici1;
    gecici2[30]=ogrenciadi[i];
    ogrenciadi[i]=ogrenciadi[j];
    ogrenciadi[j]=gecici2[30];
    }
    for(i=0;i<5;i++) cout<<ogrenciadi[i]<<" => "<<ogrencinotu[i]<<endl;


    return 0;
    }
    ···
   tümünü göster