Recent Posts

Program C++

 

“Transaksi Pembayaran Kuliah” dan” Perhitungan Volume Limas”
#include
#include
#include
void main()
{clrscr();
Int kode,angk,smstr,kodep,jsks,alas,tinggi,genap,ganjil,tanggal;
Double TAW,total,NIM;
Long spp,sks,denda;
Float ls,volume;
Char nama[50];
cout<<"-----------pilihan-----------"<cout<<"1.transaksi pembayaran kuliah"<cout<<"2.perhitungan volume limas segitiga"<cout<<"tentukan pilihan=";cin>>kode;
cout<if(kode==1)
{cout<<"innputkan NIM =";cin>>NIM;
cout<<"inputkan nama =";cin>>nama;
cout<<"inputkan angkatan =";cin>>angk;
{ if (angk==2006)
{spp=500000;
cout<<"biaya spp ="< }
else if(angk==2007)
{spp=(500000+(500000*30/100));
cout<<"biaya spp ="< }
else if(angk==2008)
{spp=(500000+(500000*60/100));
cout<<"biaya spp ="< }
else if(angk==2009)
{spp=(500000+(500000*90/100));
cout<<"biaya spp ="< }
}
cout< cout<<"------------------------------------"< cout<<"kode 1.sistem informasi"< cout<<"kode 2.manajemen informatika"< cout<<"kode 3.teknik informatika"; cout< cout<<"------------------------------------"< cout<<"inputkan kode prodi =";cin>>kodep;
cout< if((angk ==2006)&&(kodep==1))
{sks=70000;
cout<<"biaya sks ="< }
else if((angk==2007)&&(kodep==1))
{sks=(((70000+(70000*20/100))+(spp*1/100)));
cout<<"biaya sks ="< }
else if ((angk==2008)&&(kodep==1))
{sks=(((70000+(70000*40/100))+(spp*1/100)));
cout<<"biaya sks ="< }
else if((angk==2009)&&(kodep==1))
{sks=(((70000+(70000*60/100))+(spp*1/100)));
cout<<"biaya sks ="< }
else if ((angk ==2006)&&(kodep==2))
{sks=60000;
cout<<"biaya sks ="< }
else if ((angk==2007)&&(kodep==2))
{sks=(((60000+(60000*20/100))+(spp*1/100)));
cout<<"biaya sks ="< }
else if((angk==2008)&&(kodep==2))
{sks=(((60000+(60000*40/100))+(spp*1/100)));
cout<<"biaya sks ="< }
else if((angk==2009)&&(kodep==2))
{sks=(((60000+(60000*60/100))+(spp*1/100)));
cout<<"biaya sks ="< }
else if ((angk ==2006)&&(kodep==3))
{sks=80000;
cout<<"biaya sks ="< }
else if ((angk==2007)&&(kodep==3))
{sks=(((80000+(80000*20/100))+(spp*1/100)));
cout<<"biaya sks ="< }
else if ((angk==2008)&&(kodep==3))
{sks=(((80000+(80000*40/100))+(spp*1/100)));
cout<<"biaya sks ="< }
else if ((angk==2009)&&(kodep==3))
{sks=(((80000+(80000*60/100))+(spp*1/100)));
cout<<"biaya sks ="< }
else
cout<<"maaf kode yang anda masukkan salah";
cout< cout<<"inputkan jumlah sks =";cin>>jsks;cout< TAW=spp+(sks*jsks);
cout<<"-----------------------------------------"< cout<<"total awal pembayaran ="< cout< cout<<"inputkan semester =";cin>>smstr;cout< if (smstr %2==0)
cout<<"SEMESTER GENAP"< else
cout<<"SEMESTER GANJIL"< cout<<"inputkan tanggal pembayaran=";cin>>tanggal;
if((tanggal>=3)&&(smstr %2==0))
{
denda=TAW*15/100;
cout<<"denda ="< total=TAW+denda;
cout<<"total akhir pembayaran ="< }
if((tanggal>=9)&&(smstr%2!=0))
{
denda=TAW*15/100;
cout<<"denda ="< total=TAW+denda;
cout<<"total akhir pembayaran ="< }
if (((tanggal<8)&&(smstr%2!=0))||((tanggal<=2)&&(smstr%2==0)))
{total=TAW;
cout<<"total akhir pembayaran ="< }
}
if (kode==2)
{cout<<"inputkan alas =";cin>>alas;
cout<<"inputkan tinggi =";cin>>tinggi;cout< ls=alas*tinggi/2;
cout<<"luas segitiga ="< volume=ls*tinggi*1/3;
cout<<"volume limas segitiga ="< }
getch();
}

    Choose :
  • OR
  • To comment