determine employee salaries using c ++

Saturday, October 20, 2018 : 10/20/2018

0 komentar

Determine Employee

Coding, coding, just coding, maybe it's a sentence that always comes out by the RPL child, yep because it is a daily activity that must be done / required to be able to continue to increase coding skills. Not only c ++ but there are still many languages ​​to learn like HTML, JAVA, Javascript, SQL etc. But this time I will share how to determine employee salaries using c ++.




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

using namespace std;

int main ()

{

int gp, status, ja, salary_pokok, ta, ti, totgaj;
string s, select;
// main play function
on:
cout << "=============== Determine Employee Salary =================" << endl << endl;
cout << "===================== Select Group =====================" < <endl << endl;
cout << "1. Group I" << endl << endl;
cout << "2. Group II" << endl << endl;
cout << "3. Group III" << endl << endl;
cout << "4. Group IV" << endl << endl;
cout << "============================================== ========== "<< endl << endl;
cout << "====================== Select Status ====================== "<< endl << endl;
cout << "1. Married" << endl << endl;
cout << "2. Not Married" << endl << endl;
cout << "============================================== ========== "<< endl << endl;
cout << "================= Select Number of Children =====================" << endl < <endl;
cout << "1. Number of Children = 1" << endl << endl;
cout << "2. Number of Children = 2" << endl << endl;
cout << "3. Number of Children> 2" << endl << endl;
cout << "4. Don't Have Children" << endl << endl;
cout << "============================================== ========== "<< endl << endl;
// logic function determines Employee Salary
cout << "Enter Group Options:"; cin >> gp;

if (gp == 1)
{
basic salary = 1500000;
}
else if (gp == 2)
{
salary_pokok = 2000000;
}
else if (gp == 3)
{
principal salary = 2500,000;
}
else if (gp == 4)
{
salary_pokok = 2000000;
}
other
{
rak_pokok = 0;
}


cout << "\ n ============================================ ============ "<< endl << endl;
// logic function determines status
cout << "Enter Option Status:"; cin >> status;

if (status == 1)
{
s = "Married";
ti = 200000;
}
other
{
s = "Not Married";
ti = 0;
}


cout << "= \ n =========================================== ============ "<< endl << endl ;;
// logical function determines the number of children
cout << "Enter the Number of Children:"; cin >> ja;

if (ja == 1)
{
ta = 100000;
}
else if (ja == 2)
{
ta = 200000;
}
else if (ja == 3)
{
ta = 250000;
}
other
{
ta = 0;
}

cout << "\ n ============================================ =========== "<< endl << endl;

totgaj = salary_pokok + ta + ti;
cout << "Employee Name: Restu Kersana" << endl << endl;
cout << "Your basic salary: Rp." << salary_pokok << endl << endl;
cout << "Wife Allowance: Rp." << ti << endl << endl;
cout << "Child Benefits: Rp." << ta << endl << endl;
cout << "Total salary that must be paid by the company: Rp." << totgaj << endl << endl;
cout << "============================================== ========== "<< endl;

Share this Article
< Previous Article
Next Article >

0 komentar :

Copyright © 2019 Pemulakuy.com - All Rights Reserved