#include<iostream>
#include<iomanip>
using namespace std;
struct siswa_str
{
char name[25], alamat[40], jk[10], nope[12];
};
int main(){
siswa_str siswa[30];
int loop;
char ulangi='y';
cout<<"Data Siawa SMK DARUL MUSYAWAROH JEPARA\n";
for(loop=1; loop<30 && ulangi=='y'; loop++)
{
cout<<"Masukkan Nama Murid : ";
cin.getline(siswa[loop].name,80,'\n');
cout<<"Masukkan Alamat Murid : ";
cin.getline(siswa[loop].alamat,80,'\n');
cout<<"Masukkan Jenis Kelamin Murid [Pria/Wanita] : ";
cin.getline(siswa[loop].jk,80,'\n');
cout<<"Nomor HP # : ";
cin>>siswa[loop].nope;
cout<<"\n";
cout<<"\nData Siawa SMK DARUL MUSYAWAROH JEPARA";
cout<<setw(15)<<"\n___________________\n";
cout<<"Data ke - "<<loop;
cout<<"\nNama Murid \t : "<<setw(15)<<siswa[loop].name;
cout<<"\nAlamat \t\t : "<<setw(15)<<siswa[loop].alamat;
cout<<"\nJenis Kelamin \t : "<<setw(15)<<siswa[loop].jk;
cout<<"\nNOPE \t\t : "<<setw(15)<<siswa[loop].nope;
cout<<"\n\n";
cout<<"Mau Tambah Data Lagi? [y/n] : ";
cin>>ulangi;
cin.ignore(80,'\n');
}
cout<<"\n";
}
0 komentar:
Posting Komentar