Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Arrays
//gcc 5.4.0 #include <stdio.h> #define n 5 //working with the defined constant n// int main(void) { int array1[n] = {10,20,30,40,50}; int array2[n] = {1,2,3,4,5}; int array3[n] = {1,2,3,4,5}; for (int i=0; i<n; ++i){ if(i%2==0){ array3[i] = array1[i]*array2[i]; printf("array[%d]=%d\n",i,array1[i]*array2[i]); } else array3[i] = array1[i]; } printf("array[%d]=%d\n", i, array1[i]); return (0); }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Divisibility :- #simple-math #ad-hoc-1 #basics
Float data type.c
Lab6 v1.2 Sin,cos,tan,cot
2
18BCE2182 ASSESS_1 Q2-2
Bitwise Operations
Calculating longs p v1
print_odd_pointer.c
get_bit
a1
Please log in to post a comment.