Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <htc.h>
- int DD0;
- int DD1;
- int DD2;
- int DD3;
- void main(void)
- {
- float test = 00.75;
- long value ;
- value = (long)(test*100);
- DD0 = ((value/1000)%10);
- DD1 = ((value/100)%10);
- DD2 = ((value/10)%10);
- DD3 = ((value/1)%10);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement