WAP to calculate the gross salary for the conditions given below. Basic salary is inputted
from the user.
#include <iostream>
int main()
{
//Gross Salary is the amount of salary after adding all benefits and allowances but before deducting any tax
double grossSalary;
double basicSalary;
double amountAllowances;
std::cerr << "Enter the basic salary: ";
std::cin >> basicSalary;
std::cerr << "Enter the amount of allowances received: ";
std::cin >> amountAllowances;
grossSalary = basicSalary + amountAllowances;
std::cerr << "Gross Salary = "<<grossSalary;
return 0;
}
Comments
Leave a comment