#include <stdio.h>
#include <iostream.h>
#include <conio.h>
#include <iomanip.h>
garis()
{
cout<<"==========================================="<<endl;
}
creator()
{
puts(" *******Terimakasih******");
puts(" febi suci ekasari (12180771)");
puts(" ===BSI 12.1C.03===");
puts(" *******************");
}
judul()
{
cout<<"Laporan Data Costumer";
}
void main ()
{
int i,j;
char lagi;
struct
{
char nama[20];
char alamat[20];
char ttl[20];
char jenis_kelamin;
char no_tlp[13];
char email[20];
}data[6];
awal:
clrscr();
cout<<"Masukan Jumlah Customer:";cin>>j;
garis();
clrscr();
for(i=1;i<=j;i++)
{
cout<<"Data Ke-"<<i<<endl;
cout<<"Nama :";cin>>data[i].nama;
cout<<"Alamat :";cin>>data[i].alamat;
cout<<"Tempat Tanggal Lahir :";cin>>data[i].ttl;
cout<<"Jenis Kelamin[L/P] :";cin>>data[i].jenis_kelamin;
cout<<"No Telepon :";cin>>data[i].no_tlp;
cout<<"Email :";cin>>data[i].email;
}
clrscr();
garis();
judul();cout<<endl;
garis();
puts("Nama Alamat Tempat Tanggal Lahir Jenis Kelamin No Telepon email ");
garis();
for(i=1;i<=j;i++)
{
cout<<setiosflags(ios::left)<<setw(4)<<data[i].nama;
cout<<setiosflags(ios::left)<<setw(10)<<data[i].alamat;
cout<<setiosflags(ios::left)<<setw(15)<<data[i].ttl;
cout<<setiosflags(ios::left)<<setw(11)<<data[i].jenis_kelamin;
cout<<setiosflags(ios::left)<<setw(12)<<data[i].no_tlp;
cout<<setiosflags(ios::left)<<setw(4)<<data[i].email<<endl;
}
garis();
creator();
cout<<"Input data lagi T/Y:";cin>>lagi;
if(lagi=='Y'||lagi=='y')
goto awal;
else
goto akhir;
getch();
akhir:
}
Tidak ada komentar:
Posting Komentar