Source Code
#include<iostream.h>
#include<conio.h>
int n[50];
int x,y,z;
int total , totrental, totkaryawan, totpr ,totrentalbul , totkaryawanbul , totprbul;
int harga;
input ()
{
cout << "Jumlah Keeping VCD = ";
cin >>x;
cout << "Harga perkeping VCD = ";
cin >> y;
cout << "Jumlah Karyawan = ";
cin >> z;
}
proses()
{
harga = x*y;
if (x>=3)
{
double dis = harga * 10.5/100;
total= harga - dis;
}
if (x>=10)
{
double dis = harga * 15.5/100;
total= harga - dis;
}
else
{
total = harga;
}
totrental = total*35/100;
totrentalbul = (total*35/100)*30;
totkaryawan = (total*6/100);
totkaryawanbul = (total*6/100)/z;
totpr = (total*5/100);
totprbul = (total*5/100)*30;
return total;
return totrental;
return totrentalbul;
return totkaryawan;
return totkaryawanbul;
return totpr;
return totprbul;
}
output ()
{
cout<<"================================================"<<endl;
cout << "Total = "<< total<<endl;
cout<<"================================================"<<endl;
cout<<"yang didapat rental = "<<totrental<<endl;
cout<<"yang didapat rental perbulan = "<<totrentalbul<<endl;
cout<<"================================================"<<endl;
cout<<"yg didapat masing2 karyawan = "<<totkaryawan<<endl;
cout<<"yg didapat masing2 karyawan perbualan = "<<totkaryawanbul<<endl;
cout<<"================================================"<<endl;
cout<<"untuk pengembangan = "<<totpr<<endl;
cout<<"untuk pengembangan dalam sebulan= "<<totprbul<<endl;
}
main ()
{
input ();
proses();
output();
getch();
}
Output Program
Note : tolong Coment ya... hehe
Tidak ada komentar:
Posting Komentar