Connect with one of the following accounts


Please wait while we redirect...

Views: 151   

Following program shows you how to take birth year and tells age.
In this program we get birth year from user and tells their age using currentYear - birthYear

#include <stdio.h>
int main(void) {
    int birthYear;
    printf("Please enter your birth year:");
    scanf("%d", &birthYear);
    int age = 2018 - birthYear;
    printf("Your age is %d \n", age);


Please enter your birth year: 1991
Your age is 27

On By

Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News