C examples for Language Basics:Hello World
Don't worry about fractional years and leap years.
#include <stdio.h> int main(void) { int ageyears; /* age in years */ int agedays; /* age in days */ /* w w w . j a v a 2s .c om*/ ageyears = 101; agedays = 365 * ageyears; printf("An age of %d years is %d days.\n", ageyears, agedays); return 0; }