ee_cchac
Member level 1

dear all,
i now facing a simple problem.....when i going to calculate the means of a set of value. i was able to find the means...but it is an integer....i try to force it to float...double....but all result in error value.
my h/w as follow:
AT86RF211 development kit. with MCUs AT90LS8535
code is as follow:
unsigned int a;
float intx;
for ( int i =0; i <9 ; i++)
a= a+a;
x= x/a;
x sow only an integer....but i want real number...
i wonder the reason is due to the LCD display....what should i do ??? help....please...
i now facing a simple problem.....when i going to calculate the means of a set of value. i was able to find the means...but it is an integer....i try to force it to float...double....but all result in error value.
my h/w as follow:
AT86RF211 development kit. with MCUs AT90LS8535
code is as follow:
unsigned int a;
float intx;
for ( int i =0; i <9 ; i++)
a= a+a;
x= x/a;
x sow only an integer....but i want real number...
i wonder the reason is due to the LCD display....what should i do ??? help....please...