Nama : achmad tobib b
Npm :0734010027
#include
struct
{
char npm[50];
int jmlh, bulan, c;
}
mhs[1000];
class spp
{
int pilih, a, awal, mengulang;
int temp, urut;
public:
void bayar (void)
{
urut=1;
cout<<"\n\nSystem Pembayaran SPP Mahasiswa \n\n";
cout<<"\nNPM : "; cin>>mhs[urut].npm;
cout<<"UNTUK BULAN : "; cin>>mhs[urut].bulan;
}
void bayar (long int hit,float jmlh, long int b)
{
cout<<"\n\nBesar Uang Anda\n\n";
cin>>b;
if (mhs[urut].bulan==1||mhs[urut].bulan==2||mhs[urut].bulan==3||mhs[urut].bulan==4||mhs[urut].bulan==5||mhs[urut].bulan==6)
mhs[urut].c=799000;
else
mhs[urut].c=600000;
hit=b-mhs[urut].c;
cout<<"\n+++++++++++++++++++++++++++++++++++";
cout<<"\n\n Transaksi Pembayaran SPP dengan: ";
cout<<"\n\n NPM : "<
cout<<"\n\nTotal Pembayaran SPP Anda :"<
};
void main()
{
int pilih, awal=0, mengulang;
char ya;
do
{
cout<<"==========++++++++++++++=============="<
do
{
spp ok;
ok.bayar();
ok.bayar(1,1,1);
cout<<"\nApakah Anda Ingin Mengulang (y/t) ? ";
cin>>ya;
}
while (ya=='y');
}
awal=1;
mengulang=awal+1;
}
while (mengulang==1);
}
Tidak ada komentar:
Posting Komentar