here is my code...
Code:
#include <stdio.h>
#include <math.h>
int main(void)
{
float a1max, a2max, step,a1values, a2values;
a1values=0.1, a2values=0.5;
a1max=0.5, a2max=1.0;
step=0.1 ;
while (a1values <= 0.5)
{
printf("a1values=%f\n\t",a1values);
a1values=a1values+step;
}
printf("\n\n\n\n\n");
while (a2values <= 1.1)
{
printf("a2values=%f\n\t",a2values);
a2values=a2values+step;
}
/*here where is i want exactly nested while loops
after obtaining all the values of a1values and a2values
now i need to calculate the area, which is
all the elements of a1values divide by the first value of a2valyes which are,
0.1/0.5 0.2/0.5 0.3/0.5 0.4/0.5 0.5/0.5
all the values of a1values again divide by the second value of a2values which are,
0.1/0.6 0.2/0.6 0.3/0.6 0.4/0.6 0.5/0.6
and so on
the nested loop look like this
while(statement)
{ expression
while(statement)
{expression
and then print the total area of all the elements of a1values/one by one of elements a2values
i have no clue how many loops i have to do as it really confuse me*/
getch();
}