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.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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.Similar questions
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education