This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cs50.h> | |
#include <stdio.h> | |
int main(void) | |
{ | |
// declare a string named "name" and get input with get_string | |
string name = get_string("Enter Name: "); | |
// declare an int named "age" and get user input with get_int | |
int age = get_int("Enter Age: "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cs50.h> | |
#include <stdio.h> | |
int main(void) | |
{ | |
int age = get_int("Enter Your Age: "); | |
// Let's assume my age is 17 | |
printf("Right now I'm %i years old.\n", age); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) | |
{ | |
printf("This is CS50AP!\n"); | |
} |
NewerOlder