feat: update structure

This commit is contained in:
2024-01-22 14:27:40 +08:00
parent 7836c9185c
commit 3544a28a2e
559 changed files with 120846 additions and 4102 deletions

View File

@@ -0,0 +1,20 @@
#include <stdio.h>
#include "queue.h"
int main() {
int i;
for(i=1; i<=9; i++)
{
printf("Enqueing %d\n", i);
enq((double) i);
}
printf("\nCalling reduce result is %3.2f\n", reduce());
/* Uncomment the following two statements to test flex_reduce */
printf("Calling flex reduce with sum. Result is %3.2f\n", flex_reduce(clear_sum, sum));
printf("Calling flex reduce with prod. Result is %3.2f\n", flex_reduce(clear_prod, prod));
}