home *** CD-ROM | disk | FTP | other *** search
- /* General form test program for scientific functions */
-
- /* Routine Tested: SORT */
-
- main()
-
- {
- int *fp,i; /* utility variables */
-
- int n = 10;
- static float a[10] = {4.1,-.5,-10.0,1.,3.4,4.3,3.6,10.1,-10.1,0.};
-
- *fp=fopen("PRN:","w"); /* open the printer */
-
- sort(a,n); /* call the function */
-
- fprintf(*fp,"Test Results from function SORT\n\n");
- printf("Test Results from function SORT\n\n");
-
- for (i=0; i<=n-1; i++) /* print results */
- {
- fprintf(*fp,"%5.1f\n",a[i]);
- printf("%5.1f\n",a[i]);
- }
- }
-