commit f4ba752e04220c4c66858fbd77edf930dbf46afe Author: BrendanTCC Date: Sun Mar 7 13:30:19 2021 +1100 initial commit diff --git a/helloworld.c b/helloworld.c new file mode 100644 index 0000000..b165345 --- /dev/null +++ b/helloworld.c @@ -0,0 +1,8 @@ +#include +int main() { + int me = 69; + printf("hello world.\n"); + printf("%d", me); + printf("\n"); + return 0; +} \ No newline at end of file diff --git a/math.c b/math.c new file mode 100644 index 0000000..d3bc6f5 --- /dev/null +++ b/math.c @@ -0,0 +1,13 @@ +/* +a math thing to correct anton +*/ +#include +int main() { + int a = 2; + int b = 2; + float sum; + + sum = a + b; + printf("2+2 is %f.\n", sum); + return 0; +} \ No newline at end of file diff --git a/variables-windows.c b/variables-windows.c new file mode 100644 index 0000000..8da3096 --- /dev/null +++ b/variables-windows.c @@ -0,0 +1,12 @@ +/* +a thing to self-teach variables. +*/ +#include +int main() { + char name[9999]; + printf("what's your name?\n"); + scanf("%s", name); + system("cls"); + printf("hello, %s.\n", name); + return 0; +} \ No newline at end of file diff --git a/variables.c b/variables.c new file mode 100644 index 0000000..7731f62 --- /dev/null +++ b/variables.c @@ -0,0 +1,12 @@ +/* +a thing to self-teach variables. +*/ +#include +int main() { + char name[9999]; + printf("what's your name?\n"); + scanf("%s", name); + system("clear"); + printf("hello, %s.\n", name); + return 0; +} \ No newline at end of file