Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(void) {
- int x[] = { 1, 2, 3, 4 };
- int y[] = { 4, 3, 2, 1 };
- int e = sizeof(x) / sizeof(int);
- int z[e];
- int i;
- for (i = 0; i < e; i++) {
- z[i] = x[i] * y[i];
- }
- printf("[");
- for (i = 0; i < e; i++) {
- printf("%d", z[i]);
- if (i < e - 1) printf(", ");
- }
- printf("]\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement