//nama:rendi pratama//
//nim:101511025//
//kelas:1A//
//tujuan program:pentotalan gaji pegawai//
#include<stdio.h>
#include<conio.h>
#include<iostream.h>
int main()
{
int i,pjl[6],gp[6],bns[6];//dekralasi//
long int gt[6],total;//dekralasi//
//input//
i=1;
while(i<=5)//looping//
{
cout<<"sales man ke-"<<i;
cout<<"\n";
cout<<"____________________";
cout<<"\n"<<"\n";
cout<<"penjualan=";
cin>>pjl[i];
cout<<"gaji pokok=";
cin>>gp[i];
cout<<"\n";
i++;
}
//proses//
total=0;
i=1;
while (i<=5)
{
if(pjl[i]<2000)
{
bns[i]=pjl[i]*0.05;
}
else
{
bns[i]=pjl[i]*0.1;
}
gt[i]=gp[i]+bns[i];
total=total+gt[i];
i++;
}
//out put//
i=1;
while(i<=5)
{
cout<<"sales man ke-"<<i;
cout<<"\n";
cout<<"____________________";
cout<<"\n";
cout<<"penjualan="<<pjl[i]<<"\n";
cout<<"gaji pokok="<<gp[i]<<"\n";
cout<<"bonus="<<bns[i]<<"\n";
cout<<"gaji diterima ="<<gt[i]<<"\n"<<"\n"
;
i++;
}
cout<<"total ="<<total;
getch();
}
2010-11-16
program penghitungan gaji pegawai
21.17
RENDI PRATAMA
Diberdayakan oleh Blogger.
0 komentar:
Posting Komentar