Created
December 16, 2020 22:53
-
-
Save Edward34William/139cecec9e4604c1eca0aff0a29a58df to your computer and use it in GitHub Desktop.
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() | |
{ | |
printf("Hello World\n"); | |
int x =50; | |
int y; //declaration | |
y = 10; //initialization | |
printf("%s World\n", "Hello"); | |
printf("The value of x is %d\n", x); | |
printf("X; %d, Y: %d\n", x, y); | |
printf("Give me a radius: "); | |
int radius; | |
scanf("%d", &radius); //address-of-operator (pointer) | |
printf("You chose the value %d\n", radius); | |
char name[20]; //char array of 20 characters. '\0' takes one spot | |
scanf("%19s", name); | |
printf("Your name: %s\n", name); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment