Write a program to check if the person falls in the age bracket of a child, an adult , a middle aged person or an older adult by initializing the value in the program(by adding the value in the program) and also by taking the input from the user. Cafeterias are as follows: Child: Age 0-17 Adult: Age 18-35 Middle Aged Adult: 36-55 Older Adult: 55 and above but in c language.........
Answers
Answered by
0
Explanation:
#include <conio.h>
#include <iostream.h>
void main()
{
cout<<"enter ur age"
int age;
cin>>age
if (age<=35&&age>18)
cout<<"u r adult "
if (age<=17&&age>=0)
cout<<"u r child "
if (age<=55&&age>35)
cout<<"u r middle aged"
if (age<=100&&age>55)
cout<<"u r older"
}
mark brainliest
Answered by
0
Answer:
int age;
scanf("%d" , age);
if( age<0)
printf("invalid age");
else if( age <18)
printf ("child");
else if( age>=18&& age<=35)
printf (" adult");
else ( age>=36 && age<=55)
printf("middle aged adult");
else
print ("older adult");
Similar questions
Science,
4 months ago
Social Sciences,
4 months ago
Political Science,
4 months ago
Science,
8 months ago
Hindi,
8 months ago
English,
11 months ago
Physics,
11 months ago