diff --git a/C/Basic/sum.c b/C/Basic/sum.c new file mode 100644 index 0000000..0ec1c67 --- /dev/null +++ b/C/Basic/sum.c @@ -0,0 +1,24 @@ +#include + +double sum(double data[], int n) +{ + int i; + double total = 0.0; // 変数の宣言 + + for(i=0; i