Answer to Question #212240 in C for ABHINEET GAUR

Question #212240

Videocon gives a hike in the salaries for its employees based on the number of TVs sold by the employees in the financial year. Vishnu wants to know his new salary. Following are the requirements to solve the problem

a) If the No’s of TV’s sold is less than 5000, then the hike is 5%

b) If the No’s of TV’s sold is greater than or equal to Rs 5000 and less than 6500 then the hike is 7%

c) If the No’s of TV’s sold is greater than or equal to Rs 6500 then the hike is 9%

d) Capture Vishnu’s present salary and the no of TV’s sold by Vishnu

e) Display Vishnu’s new salary


1
Expert's answer
2021-06-30T06:06:52-0400
#include <bits/stdc++.h>
using namespace std;


int main()
{
    int tv_sold, salary,hike;
    
    cout<<"Enter number of TV's sold: ";
    cin>>tv_sold;
    
    cout<<"Enter your Salary: ";
    cin>>salary;
    
    if (tv_sold < 5000)
    {
        hike = salary  + (salary * 0.05);
        cout<<"Your new Salary is: "<<hike;
    }
    else if (tv_sold >= 5000 or tv_sold < 6500)
    {
        hike = salary  + (salary * 0.07);
        cout<<"Your new Salary is: "<<hike;
    }
    else if (tv_sold > 6500)
    {
        hike = salary  + (salary * 0.09);
        cout<<"Your new Salary is: "<<hike;
    }
    


    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