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