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
array practice
BSEARCH() WITH STRUCT
Static scope
Intro to Arrays with comments
02468
22nd HW Switchv1.0
FloatInt
PREGUNTA 3 FICHERO
AVANCE PREGUNTA 3 FICHEROS
Lab 9 v0.96