#include #include using namespace std; void cr2mf() { int m, n, i, j; printf("create table of real numbers\n"); printf("m="); scanf("%d",&m); printf("n="); scanf("%d",&n); srand(time(NULL)); FILE*f; f=fopen("dat.txt","w"); float p; for (i=0; i<=m-1; i++ ) { for (j=0; j<=n-1; j++ ) { p=(float) rand()*2000/RAND_MAX -1000; fprintf(f,"%11.6f ",p); } fprintf(f,"\n"); } fclose(f); }; //проверка существовавния текстового файла dat.txt int experiment() { FILE *f; f=fopen("dat.txt", "r"); if (f == NULL) return 1; fclose(f); }; void ordered() { FILE*f; int m, n, i, j, k, l, min; m=0; n=-1; float x; f=fopen("dat.txt","r"); while(!feof(f)) { n++; fscanf(f,"%f",&x); }; fclose(f); char s[200]; f=fopen("dat.txt","r"); while ( NULL != fgets ( s, 200, f ) ) m++; fclose(f); n=n/m; float **b=new float*[m]; for (i=0; i