# Salary Tax Calculator in C++ – Salary Calculator

In this Program of C++, We will make Salary Tax Calculator in C++ – Salary Calculator and I made the CS201 Assignment 1st Solution idea. because it was the demand of the readers.

I will cover the Virtual University’s all CS code related book’s Assignments and teach the students how to code easily in different Programming languages.

Today I made a Salary calculator in C++, with if, else conditions and basic Arithmetic logical operations.

## 1.Read the C++ Programming from Start Full Course

Here, I am telling you about my source code that this code has used many variables for different stages, and steps.

So we manipulate them with a lot of arithmetic operators like multiply, division, addition, and subtraction, etc…

We also use if and else conditions in this program to make good construct. Then, In the following, Officers has different scale of salary and Salaries is:
salary1 = 60000;
salary2 = 80000;
salary3 = 100000;
salary4 = 120000;

All the salary1, 2, 3 has a same date type like integer represented with int. So, Copy This Code and Compile to Run in dev-c++, but, do this carefully.

## Salary Tax Calculator in C++ – Salary Calculator

``````#include <iostream>
using namespace std;
int main()
{
int number;
int salary1, salary2, salary3, salary4;
int IncreaseRate1, IncreaseRate2, IncreaseRate3, IncreaseRate4;
int increased1, increased2, increased3, increased4;
int texRate1, texRate2, texRate3, texRate4;
int Net1, Net2, Net3, Net4;
int Tex;
salary1 = 60000;
salary2 = 80000;
salary3 = 100000;
salary4 = 120000;
// This Calculation is For SCALE-12's Man Salary
IncreaseRate1 = (60000*25)/100;
increased1 = 60000+((60000*50)/100);
texRate1 = (increased1*6)/100;
Net1 = increased1 - texRate1;
// This Calculation is For SCALE-14's Man Salary
IncreaseRate2 = (80000*22)/100;
increased2 = 80000+((80000*22)/100);
texRate2 = (increased2*6)/100;
Net2 = increased2 - texRate2;
// This Calculation is For SCALE-16's Man Salary
IncreaseRate3 = (100000*20)/100;
increased3 = 100000+((100000*20)/100);
texRate3 = (increased3*6)/100;
Net3 = increased3 - texRate3;
// This Calculation is For SCALE-18's Man Salary
IncreaseRate4 = (120000*15)/100;
increased4 = 120000+((120000*15)/100);
texRate4 = (increased4*6)/100;
Net4 = increased4 - texRate4;
cout << "*********SALARY CALCULATER*********" << '\n';
cout << "***********************************" << '\n';
cout << "*********Enter 1 for SCALE-12**********" << '\n';
cout << "*********Enter 2 for SCALE-14**********" << '\n';
cout << "*********Enter 3 for SCALE-16**********" << '\n';
cout << "*********Enter 4 for SCALE-18**********" << '\n';
cout << "Select a pay scale from the menu :";
cin >> number;

if(number == 1)
{
cout << "Initial Salary: ";
cout << salary1 << '\n';
cout << "Increment Amount: ";
cout << IncreaseRate1 << '\n';
cout << "Increased Salary: ";
cout <<  increased1 << '\n';
cout << "Tax Deduction: ";
cout <<  texRate1 << '\n';
cout << "Net Salary: ";
cout << Net1;
}
else if(number == 2)
{
cout << "Initial Salary: ";
cout << salary2 << '\n';
cout << "Increment Amount: ";
cout << IncreaseRate2 << '\n';
cout << "Increased Salary: ";
cout <<  increased2 << '\n';
cout << "Tax Deduction: ";
cout <<  texRate2 << '\n';
cout << "Net Salary: ";
cout << Net2;
}
else if(number == 3)
{
cout << "Initial Salary: ";
cout << salary3 << '\n';
cout << "Increment Amount: ";
cout << IncreaseRate3 << '\n';
cout << "Increased Salary: ";
cout <<  increased3 << '\n';
cout << "Tax Deduction: ";
cout <<  texRate3 << '\n';
cout << "Net Salary: ";
cout << Net3;
}
else if(number == 4)
{
cout << "Initial Salary: ";
cout << salary4 << '\n';
cout << "Increment Amount: ";
cout << IncreaseRate4 << '\n';
cout << "Increased Salary: ";
cout <<  increased4 << '\n';
cout << "Tax Deduction: ";
cout <<  texRate4 << '\n';
cout << "Net Salary: ";
cout << Net4;
}
else
{
cout << "Selected choise is invalid.";
}
}``````

So, If you don’t know how to convert c++ code into .cpp file because of the lack of knowledge. then watch the video and learn and download .cpp file and this Youtube video description has the link to this file and goes to download it.

## So, here is our Recent Topic

1. Introduction to C++ Programming then follows the number two.
2. C++ Syntax – Learn C++ Programming and then follows the number Three.
3. Comment in C++ – Single-line & Multi-line and then follows the number Four.
4. C++ Output (Display Text) – C++ New Lines and then follows the number Fiver.
5. C++ Variables and Learn C++ Programming and Learn C++ Complete. It's me Usama Arshad working as a Lecturer C++. I am a student of BSIT.

##### One thought on “Salary Tax Calculator in C++ – Salary Calculator”
1. Asif says:

its a Nice Post for Ever Source code is Awesome