my problem occur when run the program is i cant enter the value that i want to in the function(float read(float x[10],y[10]).
Code:
#include <stdlib.h> #include <stdio.h> #include <math.h> main () { float read(float x[10],float y[10]); float calculate_A(float x0,float y0); float a,b; float x[10]; float y[10]; float x0,x1,x2,y0,y1,y2; a=x0,b=y0; printf("the mean value for x is %f",a); printf("the mean value for y id %f",b); getch(); } loat read(float x[10],float y[10]) { int n,i; float x0,y0; float x[10],y[10]; puts("enter the number of data(n):\n"); scanf(" %d",&n); puts("enter the values for x:\n"); for(i=0;i<=9;i++) {scanf(" %f",&x[10]);} puts("enter the values for y:\n"); for(i=0;i<=9;i++) {scanf(" %f",&y[10]);} return ; //system("pause"); } float calculate_A(float x0,float y0) { int n,sum1,sum2,sum; float x[10],y[10]; sum1=sum+x[10]; x0=sum1/n; sum2=sum+y[10]; y0=sum2/n; printf("%f",x0); printf("%f",y0); return(x0,y0); } //system("pause");
Comment