• Language

    C

  • Description

    It reads your age from the console and prints your age after 10 years.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
#include <stdlib.h>

int main (void)
{
    int age_after_10_years, your_age;
    printf ("Enter the value of your age: ");
    scanf ("%d", &your_age);
    (void) getchar ();
    age_after_10_years=your_age+10;
    printf ("Value of age after 10 years: %d\n", age_after_10_years);
    putchar ('\n');
    system ("pause");
    return EXIT_SUCCESS;
}