Asking for more than one input for Array?

For a code I need to write, I need to ask the user for 10 components in an array, which are separated by a comma. This is done twice in order to get 20 overall points. How would I go about getting 10 different components though in a single array? Would you just do %lf 10 times and after the quotes do ,point1 10 times as well? Here's what I have so far, I just want to know how to get 10 inputs in a single scanf. Thank you so much!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  #include <stdio.h>

int main () {
 
//variables used in the program 
 
const int U = 10;
const int V = 10;

double A[U];
double B[V];
double point1;
double point2;

//asks user for the 10 components of the first array.
printf("Enter the 10 components of point 1.\n");
	scanf("%lf", point1);

//asks user for the 10 components of the second array.
printf("Enter the 10 components of point 2.\n");
return 0;
}
Last edited on
Topic archived. No new replies allowed.