Answer to Question #245508 in C++ for Yoyo

Question #245508

WAP to calculate the gross salary for the conditions given below. Basic salary is inputted 

from the user. 





1
Expert's answer
2021-10-01T18:35:39-0400
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS