Witam, jak w prosty sposób zamienic w avrgcc float na integer aby to nastepnie prosto np. wyswietlic? Uzycie printf raczej nie wchodzi w rachube z powodu zbyt duzego kodu. Zreszta nie jestem pewien czy wystepuje taka funkcja w avrgcc.
Pozdrawiam Mister
Didn't find your answer? Ask the community — no account required.
moje_zainteresowania=(unsigned int) beka_piwa; // tzn. zost. przypisane 1000 reszta jest gubiona reszta=(unsigned int)(1000*(beka_piwa-(float) ((unsigned int)beka_piwa))); // a tu reszta 999
binbcd(moje_zainteresowania); // zamiana na bcd;
// <----tu wprowadzasz na wy¶witelacz binbcd(reszta);
// <----tu wprowadzasz na wy¶witelacz. }
pozdr. radek
U¿ytkownik "Mister" snipped-for-privacy@poczta.onet.pl> napisa³ w wiadomo¶ci news:bmolrs$ibi$ snipped-for-privacy@nemesis.news.tpi.pl...
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.