i tried to do this nested loop function
double minx = -1.0
double maxx = 1.0
double miny = -1.0
double maxy = 1.0
double x;
double y;
for (x=minx;x<=maxx ;x+0.5)
{
for (y=miny;y<=maxy ;y+0.5)
{
z = x*y;
}
}
printf(value of z is %.10lf\n",z);
but after compiling the program it does nothing. could someone help me why the program does not print out the value of z here?
double minx = -1.0
double maxx = 1.0
double miny = -1.0
double maxy = 1.0
double x;
double y;
for (x=minx;x<=maxx ;x+0.5)
{
for (y=miny;y<=maxy ;y+0.5)
{
z = x*y;
}
}
printf(value of z is %.10lf\n",z);
but after compiling the program it does nothing. could someone help me why the program does not print out the value of z here?
Comment