Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Adding sums of two 1-D arrays
//gcc 5.4.0 #include <stdio.h> int main(void) { int A[3]={-1,-2,-3}; int B[3]={1,2,3}; int n=(sizeof(A))/4; int sumA,sumB; for(int i=0;i<n;i++){ sumA=sumA+A[i]; } printf("Sum of A= %d\n",sumA); for(int j=0;j<n;j++){ sumB=sumB+B[j]; } printf("Sum of A= %d\n",sumB); }
run
|
edit
|
history
|
help
0
Ptr_to_fct__v2
Run code before/after main in C (GCC)
finding 3 ones in a row
Pointer
Tree
Code2
variable arguments 2
A_141121_factorial01
app1
C_141210_Funciones