#include <string>
using namespace std;
int main()
{
int yn=0,c,dn=100;
string a; string iyi=" ",kotu=" ";
for(int i=1;i<5;i++)
{
cout<<"Isim : ";
cin>>a;
cout<<"Sinav notu : ";
cin>>c;
if(c<=100){
if(c>yn){
yn=c;
iyi=a;
}
else if(c<dn){
dn=c; kotu=a;
}
else
break;
}
}
cout<<"en yuksek notu : "<<iyi<<" aldi : "<<yn<<endl;
cout<<"en kucuk notu : "<<kotu<<" aldi : "<<dn;
}
Hiç yorum yok:
Yorum Gönder