Minggu, 01 Juli 2012

Program Perkreditan Laptop Pada Toko Komputer

cooding

#include< iostream.h>
#include< conio.h >

main()
{
int p,pil,lm,bunga,hrg,dp,angs,a=1;
int j_angs (int angs,int bng, int lm, int hrg, int dp);
cout<<"Selamat datang di Toko Komputer 'FIKTIF'\n";
cout<<"Daftar Merk Laptop\n";
cout<<"1.DELL\n2.ACER\n3.TOSHIBA\n";
cout<<"Masukkan pilihan : ";cin>>p;
if (p==1)
{
cout<<"Daftar Laptop DELL\n";
cout<<"1. Dell Inspiron 4110 Core i3-2330M\n";
cout<<"2. Dell Vostro 3350 Core i5-2410M\n";
cout<<"3. Dell Latitude E5420\n";
cout<<"Masukkan pilihan : ";cin>>pil;
if (pil==1)hrg=7093900;
else if (pil==2)hrg=9589800;
else if (pil==3)hrg=11863500;
}
else if (p==2)
{
cout<<"Daftar Laptop ACER\n";
cout<<"1. Acer Aspire 4253\n";
cout<<"2. Acer Aspire 4349-B812G50Mikk\n";
cout<<"3. Acer Aspire 5951G-2634G75Bnkk\n";
cout<<"Masukkan pilihan : ";cin>>pil;
if (pil==1)hrg=4400000;
else if (pil==2)hrg=4249000;
else if (pil==3)hrg=14390200;
}
else if (p==3)
{
cout<<"Daftar Laptop TOSHIBA\n";
cout<<"1. TOSHIBA Portege Z930-2003 - Ultrabook \n";
cout<<"2. TOSHIBA Satellite C600-1013U - Black \n";
cout<<"3. TOSHIBA Satellite P745-1017U - Black\n";
cout<<"Masukkan pilihan : ";cin>>pil;
if (pil==1)hrg=13999001;
else if (pil==2)hrg=4405500;
else if (pil==3)hrg=8149900;
}


cout<<"Uang muka : ";cin>>dp;
cout<<"Lama angsuran : ";cin>>lm;
angs=(hrg-dp)/lm;
cout<<"\nAnda telah membeli laptop dengan merk :\n";
if (p==1)
{
cout<<"Dell ";
if (pil==1)cout<<"Dell Inspiron 4110 Core i3-2330M\n";
else if (pil==2)cout<<"Dell Vostro 3350 Core i5-2410M\n";
else if (pil==3)cout<<"Dell Latitude E5420\n";
}
else if (p==2)
{
cout<<"Acer ";
if (pil==1)cout<<"Acer Aspire 4253\n";
else if (pil==2)cout<<"Acer Aspire 4349-B812G50Mikk\n";
else if (pil==3)cout<<"Acer Aspire 5951G-2634G75Bnkk\n";
}
else if (p==3)
{
cout<<"Toshiba ";
if (pil==1)cout<<"TOSHIBA Portege Z930-2003 - Ultrabook\n";
else if (pil==2)cout<<"TOSHIBA Satellite C600-1013U - Black\n";
else if (pil==3)cout<<"TOSHIBA Satellite P745-1017U - Black\n";
}

cout<<"Harga Pokok  : "<<hrg<<endl;
cout<<"Uang Muka     : "<<dp<<endl;
cout<<"Lama angsuran : "<<lm<<endl;
do
{
bunga=lm*(hrg-dp)/100;
cout<<"jumlah bunga bulan ke "<<a<<" : "<<bunga<<endl;
cout<<"jumlah angsuran bulan ke "<<a<<" : "<<j_angs (angs, bunga, lm, hrg, dp)<<endl;
lm--;
a++;
}
while (lm>=1);

getch();
}

int j_angs (int angs,int bunga, int lm, int hrg, int dp)
{
do
{
bunga=lm*(hrg-dp)/100;
int j_angs;
j_angs=angs+bunga;
lm--;
return j_angs;
}
while (lm>=1);
 }


2 komentar:

  1. maaf gan boleh liat tampilan progam yang terkait dengan koding diatas . mohon bantuan terimakasih

    BalasHapus
  2. kalo ada mohon kirim ke zhammal.ghaib@gmail.com

    BalasHapus