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,21 @@
#include <stdio.h>
int accumulate(int x) {
// Modify this function so that it accumulates values passed to it to
// a value called "acc".
static int acc = 0;
acc = acc + x;
printf("acc is now %d\n", acc);
}
int main() {
// Call fun2 to accumulate from 1 to 10
for(int i=1; i<=10; i++)
accumulate(i);
}