dolphin1
Newbie level 4
i want using some number floating point
but in the end of the my routine i want convert this(floating) code to integer but i cant find any way please write for me a few line code
thanx to every body...
const int R=384;
int Rx //Rx is variable reading from port
float z,t
main(void){
read by y from RA1;
z=y/x;
if(z<1){t=1-z;x=x+x*t;} //add(or subtruct) tolerance to R(esistance)
if(z>1){t=z-1;x=x-x*t;}
but in the end of the my routine i want convert this(floating) code to integer but i cant find any way please write for me a few line code
thanx to every body...
const int R=384;
int Rx //Rx is variable reading from port
float z,t
main(void){
read by y from RA1;
z=y/x;
if(z<1){t=1-z;x=x+x*t;} //add(or subtruct) tolerance to R(esistance)
if(z>1){t=z-1;x=x-x*t;}