Check if a person is adult or underage || Conditional Statement || C programming
In this , we are going to see a program to check if a person is adult or underage in C Programming Language.

 
#include <stdio.h>
#include <stdlib.h>

void main()
{
    system("cls");
    int num;

    printf("Enter the age of a person: \n");
    scanf("%d", &num);

    if (num >= 18)
    {
        printf("Person is in adulthood phase.");
    }
    else if (18 < num || num > 12)
    {
        printf("Person is in teenagehood.");
    }
    else
    {
        printf("Person is in childhood phase.");
    }
}

//.............Coded by YASH ALAPURIA

#ENJOY CODING

Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post