You are on page 1of 1

#include <stdio.

h>
#include <math.h>
#define pi 3.14159265359
int main()
{
double dx, dy, u[300][300];
int m=256, n=256, i, j;
dx=1.0/(m-1);
dy=dx;
for(i=1;i<=n;i++)
{
for(j=1;j<=m;j++)
u[i][j]=(cos(3*pi*(i-1)*dx))*(cos(5*pi*(j-1)*dy));
}
for(i=1;i<=n;i++)
printf("%lf\n", u[i][30]);
}

You might also like