我有2个问题。首先程序没有提示我输入第二个向量,第二个它没有给我输入第一个向量的输入。
#include <stdio.h>
#define SIZE 10
#include <string.h>
int main()
{
int Vx, Vy, i, j;
int vector[SIZE];
printf("Enter 1st vector (q to quit) " );
for (i=0;i<SIZE;i++)
{
scanf("%d", &vector[i]);
}
printf("Enter 2nd vector (q to quit) " );
for (j=0;j<SIZE;j++)
{
scanf("%d", &vector[j]);
}
printf("\nYou entered");
printf("\n%d\n", vector[i]);
printf("%d\n", vector[i]);
printf("Their dot product is; %d", vector[i] * vector[j]);
return 0;
}