#include <cstdlib>
#include <iostream>
using namespace std;
struct mahasiswa {
char nim[10];
char nama[30];
char kelas[50];
float ipk;
}mhs;
main (int argc, char *argv[])
{
mahasiswa mhs;
cout<<"NIM :"; cin.getline(mhs.nim, 15);
cout<<"Nama :"; cin.getline(mhs.nama, 30);
cout<<"kelas :"; cin.getline(mhs.kelas, 50);
cout<<"Nilai IPK :"; cin>>mhs.ipk;
cout<<endl;
cout<<endl;
cout<<"NIM Anda :" <<mhs.nim<<endl;
cout<<"Nama Anda Anda :" <<mhs.nama<<endl;
cout<<"kelas :" <<mhs.kelas<<endl;
cout<<"Nilai IPK Anda :" <<mhs.ipk<<endl;
system("pause");
return 0;
}
#include <iostream>
using namespace std;
struct mahasiswa {
char nim[10];
char nama[30];
char kelas[50];
float ipk;
}mhs;
main (int argc, char *argv[])
{
mahasiswa mhs;
cout<<"NIM :"; cin.getline(mhs.nim, 15);
cout<<"Nama :"; cin.getline(mhs.nama, 30);
cout<<"kelas :"; cin.getline(mhs.kelas, 50);
cout<<"Nilai IPK :"; cin>>mhs.ipk;
cout<<endl;
cout<<endl;
cout<<"NIM Anda :" <<mhs.nim<<endl;
cout<<"Nama Anda Anda :" <<mhs.nama<<endl;
cout<<"kelas :" <<mhs.kelas<<endl;
cout<<"Nilai IPK Anda :" <<mhs.ipk<<endl;
system("pause");
return 0;
}