Nidhitrivedi
Junior Member level 2
Hello all,
In my program i have the ans as floating point value...
Then which command i have to use?? As we have int,char. Likewise floating number is define by what?
I used float but its not working....
lcddata function is to diplay the value on lcd.
lcdcmd is to display first character on lcd.
Thanks to all....
In my program i have the ans as floating point value...
Then which command i have to use?? As we have int,char. Likewise floating number is define by what?
I used float but its not working....
Code:
unsigned int finalans;
float temp=0;
finalans=i*795;///final answer will be i*795/100;
temp=(i*795)/100;
//so suppose there are 5 digits to display then,
lcdcmd(0x80);
lcddata((temp/10000)+0x30);
[U][B]lcddata(((temp%1000)/10)+0x30);[/B][/U] (here the error is coming of bad operand)
lcddata(((temp%100)/10)+0x30);
lcddata((temp%10)+0x30);
lcddata function is to diplay the value on lcd.
lcdcmd is to display first character on lcd.
Thanks to all....
Last edited by a moderator: