make these changes,
t_a = mean(10, input[0]);
y_a = mean(10, input[1]);
//calculate v (slope), Maybe use two loops with one nested?
// i need to increment
v1=0;
v2=0;
for(i=0; i< 10; i++)
{
v1+ = ( input[0][i] - t_a)*( input[1][i] - y_a);
}
for(i=0; i< 10; i++)
{
v2=v2+( input[0][i] - t_a)*( input[0][i] - t_a);
}
v=v1/v2; //use float or double data type
input[][] is a 2D array so to access the elements use input[i][j] form.
and i dont know why you used,
for(i=0; input[0][i] ; i++) {
input[i];
}
//grab 2nd row of the array
for(i=0; input[1][i]; i++) {
input[j]; // j not initialized
}
if to print the values use printf()
for(i=0; i<10 ; i++) {
printf("%d",input[0][i]);
}
//grab 2nd row of the array
for(i=0; i<10; i++) {
printf("%d",input[1][i]);
}