move exercises, lecture examples, labs into subfolders

This commit is contained in:
2023-10-13 16:19:51 +01:00
parent a602f20e01
commit 015b5d6a08
200 changed files with 2 additions and 2 deletions

21
Exercises/C8/ex4.c Normal file
View File

@@ -0,0 +1,21 @@
#include <stdio.h>
int main() {
int age;
printf("Enter your age: ");
scanf("%d", &age);
// c only matches one branch so don't need to specify lower limits of each age range
if ( age <= 0 ) {
printf("Still a baby\n");
} else if ( age <= 12 ) {
printf("The junior years\n");
} else if ( age < 20 ) {
printf("Teenage years\n");
} else {
printf("Downhill all the way now!\n");
}
return 0;
}