#include <iostream>
using namespace std;
struct mahasiswa{
char matakuliah[20];
int nilai;
float rata;
};
void display(mahasiswa a){
int jumlah=0;
for(int i=1; i<=3; i++){
cout<<"mata kuliah :";
cin>>a.matakuliah;
cout<<endl;
cout<<"nilai :";
cin>>a.nilai;
cout<<endl;
jumlah=jumlah+a.nilai;
} a.rata = jumlah/3;
cout<<"rata-rata+"<<a.rata;
}
int main(int argc, char *argv[])
{
int rata;
mahasiswa (mhs);
cout<<endl;
//cin>>mhs.matakuliah;
//cin>>mhs.nilai;
//strcpy(mhs.namaku, "bento");
//mhs.id=54321;
display(mhs);
cout<<endl;
// cout<<"rata-rata :"<<mhs.rata;
system("PAUSE");
return EXIT_SUCCESS;
}