This discussion is now closed.
Scroll to see replies
1.c(64,15): error 31: expression must have integral type
it = xold - (y[xold]/diff);
^
1.c: In function 'find_it':
1.c:64: error: array subscript is not an integer
int main()
{
float f = 1.9;
int i = ( int ) f;
printf( "i is %d\n", i );
return 0;
}
infile = fopen("ae_4in.dat","r");
if ( infile == NULL )
{
printf( "Error: could not open ae_4in.dat\n\n" );
exit( 1 );
}
void find_diff()
{
/* **Calculate derivative using upwind differentiation** */
for (i=1;i<(e-d);i=i+1)
{
diff = (y[i+1]-y)/delta_x;
}
}
void find_it()
{
xold=igv;
while (diff>tol)
{
printf("starting iteration %d",igv);
it = xold - (y[(int)xold]/diff);
xold = it;
printf("iteration %d", it);
}
}
Last reply 1 month ago
Free website hosting providers with no strings attached?Posted 3 months ago
iDEA silver citizen badge three. Milkshake shack coding problem.Last reply 4 months ago
How do you practice programming java for beginners?Last reply 8 months ago
hows the employment market for tech work in the UK?Last reply 1 month ago
Free website hosting providers with no strings attached?Posted 3 months ago
iDEA silver citizen badge three. Milkshake shack coding problem.Last reply 4 months ago
How do you practice programming java for beginners?Last reply 8 months ago
hows the employment market for tech work in the UK?Writing a computer science personal statement: expert advice from universities
How to write an excellent personal statement in 10 steps
How to revise for GCSE Computer Science exams: AQA explains what to do
Artificial intelligence and robotics degree personal statement example (1a) with review and advice