Skip to content

Instantly share code, notes, and snippets.

@DeclanGas
Created June 23, 2022 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeclanGas/6df9784c8472505aac65cfda8d5b76de to your computer and use it in GitHub Desktop.
Save DeclanGas/6df9784c8472505aac65cfda8d5b76de to your computer and use it in GitHub Desktop.
#include <cs50.h>
#include <stdio.h>
#define ONE_YEAR 1
#define age a
int main(void)
{
// Prompt user for age
int age = get_int("Enter your age: ");
// My age next year
printf("Next year I'll be %i years old.\n", a + ONE_YEAR);
// My age in 10 years
printf("In 10 years, I'll be %i!\n", a + 10);
// My age in 50 years!
printf("In 50 years, I'll be %i! Wow!\n", a + 50);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment