Run Code
|
API
|
Code Wall
|
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
TopRightTriangle.c
18BCE2182 MIDTERM QUES-2
FahrenheitToCelcius
Assignment 4
Smartprix coding
test
thread SleepWakeup and mutex
B_141128_MatrizProducto
Project 3 Part 1 v1.1
Hello