Skip to content

Instantly share code, notes, and snippets.

@jmichalenko
Created February 13, 2024 00:40
Show Gist options
  • Save jmichalenko/050a4cebb0821882145f4837690b475f to your computer and use it in GitHub Desktop.
Save jmichalenko/050a4cebb0821882145f4837690b475f to your computer and use it in GitHub Desktop.
CS50 Labs Magic Numbers Starter Code
#include <cs50.h>
#include <stdio.h>
#define ONE_YEAR 1
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", 17 + ONE_YEAR);
// My age in 10 years
printf("In 10 years, I'll be %i!\n", 17 + 10);
// My age in 50 years!
printf("In 50 years, I'll be %i! Wow!\n", 17 + 50);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment