Dear all,
I'm a C beginner and I was doing a small practice nested loop on C when I got a very strange error which when the console opens tells me that my program has stopped working.
here is the code:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
main()
{ int i,j,k;
int i_range, j_range, k_range;
i_range = 800;
j_range = 20-1;
k_range = 1000-1;
float tt=0;
float tendrecord=1000;
float Hy_yplane_measure_cos[800][999][1];
float Hy_yplane_measure_sin[800][999][1];
int a_n=500;
float light_speed=3e8;
float S=2;
int lattice_x=100;
float freqmeasure=30;
j=floor(0.5+((0.1)*100));
if(tt<tendrecord)
{
for (k=k_range;k>=1;k--)
for(i=1;i<=i_range;i++)
{
Hy_yplane_measure_cos[i][k][1]+=1*cos(2*3.1416*freqmeasure*tt*(a_n*1E9)/(light_speed*S*lattice_x));
}
}
}
I'm using Dev C++ compiler with a C project(Console) and I have windows 7 on my laptop.
can someone help me?