The Problem
Create a program which acepts family income as input from the user and displays the proper classification of the family.
FAMILY INCOME CLASSIFICATION
FAMILY INCOME
below 12,000 - POOR
12,000 - 70,000 - MIDDLE CLASS
above 70,000 - WEALTHY
Requested By: Jp Natividad
#include <stdio.h>
#include <conio.h>
void main() {
clrscr();
int income;
printf("Enter your income: ");
scanf("%d",&income);
if (income < 12000) {
printf("Family income classification: POOR \n\n");
printf("FAMILY INCOME: %d",income);
}
else if(income >= 12000 && income <= 70000)
{
printf("Family income classification: MIDDLE CLASS \n");
printf("FAMILY INCOME: %d",income);
}
else if(income > 70000)
{
printf("Family income classification: WEALTHY \n");
printf("FAMILY INCOME: %d",income);
}
getch();
}
0 comments:
Post a Comment