Skip to content

Instantly share code, notes, and snippets.

@ianunruh
Last active December 11, 2015 12:09
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 ianunruh/4598908 to your computer and use it in GitHub Desktop.
Save ianunruh/4598908 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(int argc, char** argv)
{
int x;
printf("Enter the number to count up to: ");
if(scanf("%d", &x) != 1) {
printf("I don't think you know what a number is\n");
return -1;
}
printf("Your number was: %d\n", x);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment