To check whether the person is in teen age or not
Program:
#include<stdio.h>
#include<conio.h>
void main()
{
int age;
clrscr();
printf("Enter the age : ");
scanf("%d", &age);
if(age >= 13 && age <= 19)
printf("\nThe person is in teenage.");
else
printf("\nThe person is not in teenage.");
getch();
}
Output:
Case: 1
Enter the age : 16
The person is in teenage.
Case: 2
Enter the age : 21
The person is not in teenage.
-
UpdatedDec 30, 2019
-
Views13,563
You May Like
Program to maintain employee details using structures
Program to maintain student details using structures
Check whether the person is eligible to vote or not
Print the numbers that are divisible by a given no.
Program to generate magic square
To sort the given numbers in ascending & descending order