Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- main()
- {
- int v[9], w[10], q[10], i, j, k=0;
- printf("v:\n");
- for (i=0; i<9; i++)
- scanf("%d",&v[i]);
- printf("w:\n");
- for (i=0; i<10; i++)
- scanf("%d",&w[i]);
- for (i=0; i<9; i++)
- {
- for (j=0; j<10; j++)
- {
- if (v[i]==w[j])
- {
- q[k] = v[i]*w[j];
- printf("v[%d]=w[%d]=%d\n",i,j,v[i]);
- k++;
- }
- }
- }
- printf("q:\n");
- for (i=0; i<k; i++)
- printf("%d\n",q[i]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement