MEMBUAT PROGRAM ATM SEDERHANA MENGGUNAKAN C++
#include <iostream.h>
void main()
{
int pilih;
float pin,nama;
double s,saldo,Transfer,ambil,no;
cout << "RIKI DARMAN"<<endl;
cout << "STMIK-AMIK RIAU"<<endl;
cout << "masukan pin anda :";
cin >> pilih;
cout << "*************************"<<endl;
if (pilih==1234)
{ cout << " user :RIKMAN"<<endl;
cout << "*************************"<<endl;
cout << " masukan pilihan anda :";
cin >>pilih;
if (pilih==1)
{cout << "salda anda Rp.1000.000";}
else if (pilih==2)
{cout << "masukan saldo :";
cin>>ambil;
s=1000000-ambil;
cout<<"saldo anda Rp."<<s;
}
else if (pilih==3)
{cout << "masukan no rekening :";
cin>>no;
cout <<"masukan jumlah saldo :";
cin>>Transfer;
s=1000000-Transfer;
cout<<"no rek : "<<no<<endl;
cout<<"jumlah transfer Rp. "<<Transfer<<endl;
cout << "*************************"<<endl;
cout<<"saldo anda Rp. "<<s;
} }
else if (pilih==3456)
{ cout << " user :Astuti"<<endl;
cout << "*************************"<<endl;
cout << " masukan pilihan anda :";
cin >>pilih;
if (pilih==1)
{cout << "salda anda Rp.500.000";}
else if (pilih==2)
{cout << "masukan saldo :";
cin>>ambil;
saldo=500000-ambil;
cout<<"saldo anda Rp."<<saldo;
}
else if (pilih==3)
{cout << "masukan no rekening :";
cin>>Transfer;
saldo=500000-Transfer;
cout<<"saldo anda Rp."<<saldo;}
}
else if (pilih==5678)
{ cout << " user :Kikin Kusumah"<<endl;
cout << "*************************"<<endl;
cout << " masukan pilihan anda :";
cin >>pilih;
if (pilih==1)
{cout << "salda anda Rp.300.000";}
else if (pilih==2)
{cout << "masukan saldo :";
cin>>ambil;
saldo=300000-ambil;
cout<<"saldo anda Rp."<<saldo;
}
else if (pilih==3)
{cout << "masukan no rekening :";
cin>>Transfer;
saldo=300000-Transfer;
cout<<"saldo anda Rp."<<saldo;}
}
else if (pilih==7890)
{ cout << " user :Ari Sapta Mareta"<<endl;
cout << "*************************"<<endl;
cout << " masukan pilihan anda :";
cin >>pilih;
if (pilih==1)
{cout << "salda anda Rp.200.000";}
else if (pilih==2)
{cout << "masukan saldo :";
cin>>ambil;
saldo=200000-ambil;
cout<<"saldo anda Rp."<<saldo;
}
else if (pilih==3)
{cout << "masukan no rekening :";
cin>>Transfer;
saldo=200000-Transfer;
cout<<"saldo anda Rp."<<saldo;} }
else
{cout<<"pin salah";}
}
output akhir
void main()
{
int pilih;
float pin,nama;
double s,saldo,Transfer,ambil,no;
cout << "RIKI DARMAN"<<endl;
cout << "STMIK-AMIK RIAU"<<endl;
cout << "masukan pin anda :";
cin >> pilih;
cout << "*************************"<<endl;
if (pilih==1234)
{ cout << " user :RIKMAN"<<endl;
cout << "*************************"<<endl;
cout << " masukan pilihan anda :";
cin >>pilih;
if (pilih==1)
{cout << "salda anda Rp.1000.000";}
else if (pilih==2)
{cout << "masukan saldo :";
cin>>ambil;
s=1000000-ambil;
cout<<"saldo anda Rp."<<s;
}
else if (pilih==3)
{cout << "masukan no rekening :";
cin>>no;
cout <<"masukan jumlah saldo :";
cin>>Transfer;
s=1000000-Transfer;
cout<<"no rek : "<<no<<endl;
cout<<"jumlah transfer Rp. "<<Transfer<<endl;
cout << "*************************"<<endl;
cout<<"saldo anda Rp. "<<s;
} }
else if (pilih==3456)
{ cout << " user :Astuti"<<endl;
cout << "*************************"<<endl;
cout << " masukan pilihan anda :";
cin >>pilih;
if (pilih==1)
{cout << "salda anda Rp.500.000";}
else if (pilih==2)
{cout << "masukan saldo :";
cin>>ambil;
saldo=500000-ambil;
cout<<"saldo anda Rp."<<saldo;
}
else if (pilih==3)
{cout << "masukan no rekening :";
cin>>Transfer;
saldo=500000-Transfer;
cout<<"saldo anda Rp."<<saldo;}
}
else if (pilih==5678)
{ cout << " user :Kikin Kusumah"<<endl;
cout << "*************************"<<endl;
cout << " masukan pilihan anda :";
cin >>pilih;
if (pilih==1)
{cout << "salda anda Rp.300.000";}
else if (pilih==2)
{cout << "masukan saldo :";
cin>>ambil;
saldo=300000-ambil;
cout<<"saldo anda Rp."<<saldo;
}
else if (pilih==3)
{cout << "masukan no rekening :";
cin>>Transfer;
saldo=300000-Transfer;
cout<<"saldo anda Rp."<<saldo;}
}
else if (pilih==7890)
{ cout << " user :Ari Sapta Mareta"<<endl;
cout << "*************************"<<endl;
cout << " masukan pilihan anda :";
cin >>pilih;
if (pilih==1)
{cout << "salda anda Rp.200.000";}
else if (pilih==2)
{cout << "masukan saldo :";
cin>>ambil;
saldo=200000-ambil;
cout<<"saldo anda Rp."<<saldo;
}
else if (pilih==3)
{cout << "masukan no rekening :";
cin>>Transfer;
saldo=200000-Transfer;
cout<<"saldo anda Rp."<<saldo;} }
else
{cout<<"pin salah";}
}
output akhir
0 Response to "MEMBUAT PROGRAM ATM SEDERHANA MENGGUNAKAN C++"
Post a Comment