The following program determines if someone is eligible to receive social security payments. The rules are: • If someone is less than or equal the age of 45, they are not eligible. The code outputs "NOT ELIGIBLE" • If they are above the age of 45, and have less than 180 paid monthly subscriptions, they are eligible but to half the total retirement wage. The code outputs "ELIGIBLE-LESS" • If they are above the age of 45, have paid between 181 and 360 monthly subscriptions (inclusive), then they are eligible to the total retirement wage. The code outputs "ELIGIBLE-FULL" • If they are above the age of 45, have paid more than 360 monthly subscriptions, then they are eligible to the total retirement wage plus extra. The code outputs "ELIGIBLE- MORE" The program assumes no one aged 70 or more will apply for retirement wage this late, and therefore will output the message "VISIT" to ask them to visit the social security offices to make sure of their identity. However; the code contains many errors. Correct the code below such that it has the correct output for each of the 10 hidden secret test cases.
The following program determines if someone is eligible to receive social security payments. The rules are: • If someone is less than or equal the age of 45, they are not eligible. The code outputs "NOT ELIGIBLE" • If they are above the age of 45, and have less than 180 paid monthly subscriptions, they are eligible but to half the total retirement wage. The code outputs "ELIGIBLE-LESS" • If they are above the age of 45, have paid between 181 and 360 monthly subscriptions (inclusive), then they are eligible to the total retirement wage. The code outputs "ELIGIBLE-FULL" • If they are above the age of 45, have paid more than 360 monthly subscriptions, then they are eligible to the total retirement wage plus extra. The code outputs "ELIGIBLE- MORE" The program assumes no one aged 70 or more will apply for retirement wage this late, and therefore will output the message "VISIT" to ask them to visit the social security offices to make sure of their identity. However; the code contains many errors. Correct the code below such that it has the correct output for each of the 10 hidden secret test cases.
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 20PE: When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making...
Related questions
Question
#include
using namespace std;
int main(){
float age;
int subscriptions;
cin>>age;
switch (age/10)
{
case 1: cout<
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 4 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr