Input Outputfile
Input Outputfile
#include <fstream>
#include <sstream>
#include <vector>
using namespace std;
struct mahasiswa
{
string npm;
string nama;
float ipk;
int semester;
};
return 0;
}
/*
float nmax = 0;
for(int i=0; i<mhs.size(); i++)
{
if(i == 0){
nmax = mhs.at(0).ipk;
}else{
if(nmax <= mhs.at(i).ipk ){
nmax = mhs.at(i).ipk ;
}
}
}
cout<<"Nilai IPK tertinggi "<<nmax<<endl;
vector<mahasiswa>mhs_tinggi;
for(int i=0; i<mhs.size(); i++)
{
if(mhs.at(i).ipk == nmax){
mhs_tinggi.push_back(mhs.at(i));
}
}
for(int i=0; i<mhs_tinggi.size(); i++)
{
cout<<mhs_tinggi.at(i).npm<<" "<<mhs_tinggi.at(i).nama<<endl;
}
return 0;*/