initial commit

This commit is contained in:
Brendan Webb 2021-03-07 13:30:19 +11:00
commit f4ba752e04
4 changed files with 45 additions and 0 deletions

8
helloworld.c Normal file
View File

@ -0,0 +1,8 @@
#include <stdio.h>
int main() {
int me = 69;
printf("hello world.\n");
printf("%d", me);
printf("\n");
return 0;
}

13
math.c Normal file
View File

@ -0,0 +1,13 @@
/*
a math thing to correct anton
*/
#include <stdio.h>
int main() {
int a = 2;
int b = 2;
float sum;
sum = a + b;
printf("2+2 is %f.\n", sum);
return 0;
}

12
variables-windows.c Normal file
View File

@ -0,0 +1,12 @@
/*
a thing to self-teach variables.
*/
#include <stdio.h>
int main() {
char name[9999];
printf("what's your name?\n");
scanf("%s", name);
system("cls");
printf("hello, %s.\n", name);
return 0;
}

12
variables.c Normal file
View File

@ -0,0 +1,12 @@
/*
a thing to self-teach variables.
*/
#include <stdio.h>
int main() {
char name[9999];
printf("what's your name?\n");
scanf("%s", name);
system("clear");
printf("hello, %s.\n", name);
return 0;
}