About

Tugas Kelompok ebook chapter 5 Alpro

5.3 Figure 5.4 Program to Compute Company Payroll

#include <iostream>
#include <string>

using namespace std;
int main()
{
  int count_emp=0, number_emp;
    double rate,pay,total_pay=0,hours;
  
    cout<<"Enter number of employees> ";
    cin>>number_emp;
  
    while(count_emp<number_emp){
    cout<<"Karyawan "<<count_emp+1<<endl;
    cout<<"Hours> ";
    cin>>hours;
    cout<<"Rate> ";
    cin>>rate;
    pay= hours*rate;
    cout<<"Pay is= $ "<< pay<<endl;
    total_pay=total_pay+pay;
    count_emp=count_emp+1;
}

 cout<<"All employees processed"<<endl;
 cout<<"Total payroll is " <<total_pay<<endl; 
   return 0;
}


RUN

  

Judul : Tugas Kelompok ebook chapter 5 Alpro
Url : https://fiqriany1300018072.blogspot.com/2014/03/tugas-kelompok-ebook-chapter-5-alpro_24.html
Pada : Senin, 24 Maret 2014
Oleh : Unknown
Respond : 0
Share :

0 komentar:

Posting Komentar

Copyright © · bikin pusing ~ Template by Jasriman Sukri