diff --git a/med/C-programming-a-modern-standard/dweight.c b/med/C-programming-a-modern-standard/dweight.c new file mode 100644 index 0000000..aa30f6b --- /dev/null +++ b/med/C-programming-a-modern-standard/dweight.c @@ -0,0 +1,20 @@ +#include "stdlib.h" +#include "stdio.h" + +int main(void) +{ + float height, length, width, volume, weight; + printf("Enter height of box: "); + scanf("%f", &height); + printf("Enter length of box: "); + scanf("%f", &length); + printf("Enter width of box: "); + scanf("%f", &width); + + volume = height * length * width; + weight = (volume + 165) / 166; + + printf("Dimensions: %fx%fx%f\n", length, width, height); + printf("Volume: %f\n", volume); + printf("Weight: %f\n", weight); +} diff --git a/med/C-programming-a-modern-standard/pun.c b/med/C-programming-a-modern-standard/pun.c new file mode 100644 index 0000000..0aa031c --- /dev/null +++ b/med/C-programming-a-modern-standard/pun.c @@ -0,0 +1,7 @@ +#include "stdio.h" + +int main(void) +{ + printf("To C, or not to C: that is the question.\n"); + return 0; +} diff --git a/qscr/c/aptr.c b/qscr/c/learnc/aptr.c similarity index 100% rename from qscr/c/aptr.c rename to qscr/c/learnc/aptr.c diff --git a/qscr/c/bsort.c b/qscr/c/learnc/bsort.c similarity index 100% rename from qscr/c/bsort.c rename to qscr/c/learnc/bsort.c diff --git a/qscr/c/learnc/linkedlist.c b/qscr/c/learnc/linkedlist.c new file mode 100644 index 0000000..d8fa639 --- /dev/null +++ b/qscr/c/learnc/linkedlist.c @@ -0,0 +1,15 @@ +#include +#include + +struct node { + int val; + struct node * next; +}; + +struct node_t * head = NULL; +head = (struct node_T*)malloc(sizeof(struct node_t)); + +int main(){ + + return 0; +} diff --git a/qscr/c/pascaltriangle.c b/qscr/c/learnc/pascaltriangle.c similarity index 100% rename from qscr/c/pascaltriangle.c rename to qscr/c/learnc/pascaltriangle.c diff --git a/qscr/c/rec.c b/qscr/c/learnc/rec.c similarity index 100% rename from qscr/c/rec.c rename to qscr/c/learnc/rec.c diff --git a/qscr/c/rec2.c b/qscr/c/learnc/rec2.c similarity index 100% rename from qscr/c/rec2.c rename to qscr/c/learnc/rec2.c