Created
November 22, 2018 15:32
-
-
Save korkridake/dbae9a3a5488f46e45ae5dd8dac4c747 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* | |
Please try the C online editor here: https://repl.it/repls/CorruptPoshScriptinglanguages | |
*/ | |
#include <stdio.h> | |
/* | |
How to write your first function in C Language? | |
Desciption: | |
- "main" function | |
- { statement } identifies the function body | |
- printf: print() function displays something | |
- return 0: always ends like this for "main" function | |
*/ | |
/* | |
int main(void) { | |
printf("Hello Kyle\n"); | |
printf("Hello Che\n"); | |
return 0; | |
} | |
*/ | |
/* | |
int main(void) { | |
printf("Hello Kyle"); | |
printf("Hello Che\n"); | |
return 0; | |
} | |
*/ | |
int main(void) { | |
int x = 4; | |
int y = 5; | |
int z = x + y; | |
if (x > y) | |
{ | |
printf("Hello Kyle\n"); | |
printf("Hello Che\n"); | |
} | |
else | |
{ | |
printf("X is less than Y"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment