Skip to content

Instantly share code, notes, and snippets.

@sojohnnysaid
Created January 6, 2018 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sojohnnysaid/c2a09fec8e5af8e8552c43ad5f4c547a to your computer and use it in GitHub Desktop.
Save sojohnnysaid/c2a09fec8e5af8e8552c43ad5f4c547a to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <cs50.h>
int main(void){
// get_string and get_int are included
// within the cs50 header file
// also note the string data type
// is a part of the cs50 header file
string s = get_string("Prompt name: ");
int i = get_int("Prompt age: ");
printf("Name:\t%s\n", s);
printf("Age:\t%d\n", i);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment