Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include<iostream>
  2. #include<stdio.h>
  3. #include"fun.h"
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int nx, ny, p,i,j,n;
  9.     double ***a;
  10.     FILE *fp;
  11.     fp=fopen("results","w");
  12.  
  13.     cout<<"Enter nx, ny, p\n";
  14.     cin>>nx>>ny>>p;
  15.     n=nx+ny+1;
  16.     a=junc(nx,ny,p);
  17.     cout<<"Finish! \n";
  18.  
  19.     for(i=0;i<n;i++)
  20.         for(j=0;j<=p;j++)
  21.         {
  22.             fprintf(fp,"%f %f \n", a[i][j][0],a[i][j][1]);
  23.             cout<<i<<' '<<j<<'\n';
  24.         }
  25.  
  26.     cout<<"Finish!! \n";
  27.     fclose(fp);
  28.     cout<<"Finish!!! \n";
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement