Skip to content

Instantly share code, notes, and snippets.

Created Aug 2, 2016

What would you like to do?
Simple Array Sum
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
int main(){
int n;
int arr[n];
int sum = 0;
for(int arr_i = 0; arr_i < n; arr_i++){
sum += arr[arr_i];
printf("%i", sum);
return 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.