Connect with one of the following accounts


Please wait while we redirect...

Views: 150   

Following program shows you how to calculate salary hike.
In this program we get salary per month and hike from user and calculate new salary with hike using following formula
Salary hike = oldSalaryPerMonth + (oldSalaryPerMonth X hike/100)

#include <iostream>

int main() {
    int oldSalaryPerMonth;
    int hike;

    std::cout << "Enter your old salary per month:";
    std::cin >> oldSalaryPerMonth;

    std::cout << "Enter your hike percentage:";
    std::cin >> hike;

    int presentSalaryPerMonth =
        oldSalaryPerMonth + (oldSalaryPerMonth * hike / 100);

    std::cout << "After hike your present salary per month is: "
              << presentSalaryPerMonth;


Enter your old salary per month: 65000
Enter your hike percentage: 20
After hike your present salary per month is: 78000

On By

Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News