Hello everybody,
see this program
Code:
#include<stdlib>
#include<stdio>
#include<conio>
#include<iostream>
using namespace std;
int main()
{
int l;
double x;
float u[11][11];
h=1.0/4.0 ;
for (l=0; l<11;l++)
{
x=l*h;
u[l][0]=1.0;
printf("u= %6.4f\n",u[l][0]); //line *
printf(" %d %d %6.4f %6.4f %6.4f \n",l,0,x,0,u[l][0]); //line **
}
getch();
}//end program
the problem is that in the line *, puts the right value of u[l][0], it is one (1.0), but in the next line **, puts the value of u[l][0] as zero (0).
the problem is using printf?
Any suggest?
Bye Miguel.