#include<stdio.h>
#include<conio.h>
#include<iostream>
using namespace std;
struct Mahasiswa
{
char Nim[100];
char Nama[100];
char Alamat[40];
short Umur;
};
main()
{
Mahasiswa Mhs;
cout<<"Nim : ";
cin.getline(Mhs.Nim,100);
cout<<"Nama : " <<endl;
cin.getline(Mhs.Nama,100);
cout<<"Alamat : "<<endl;
cin.getline(Mhs.Alamat,40);
cout<<"Umur : "<<endl;
cin>>Mhs.Umur;
cout<<"\n\n\nNim : "<<Mhs.Nim;
cout<<"\nNama : "<<Mhs.Nama;
cout<<"\nAlamat : "<<Mhs.Alamat;
cout<<"\nUmur : "<<Mhs.Umur;
getch();
}
Tidak ada komentar:
Posting Komentar