CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

insert a dot

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Calamar



Joined: 07 Sep 2003
Posts: 60
Location: Buenos Aires (Argentina)

View user's profile Send private message Send e-mail MSN Messenger

insert a dot
PostPosted: Wed Jun 15, 2005 1:25 pm     Reply with quote

If I have:

a = 12234
b = 875
c= 56
d = 9

and i would like display in a LCD

a = 122.34
b = 8.75
c = 0.56
d = 0.09

How could I do it ???
_________________
Best Regards
Daniel H. Sagarra
La Plata (Argentina)
Charlie U



Joined: 09 Sep 2003
Posts: 183
Location: Somewhere under water in the Great Lakes

View user's profile Send private message

PostPosted: Wed Jun 15, 2005 2:16 pm     Reply with quote

Would this work:

a1 = a/100;
a2 = a%100;
printf("a=%u.%02u", a1, a2);
Calamar



Joined: 07 Sep 2003
Posts: 60
Location: Buenos Aires (Argentina)

View user's profile Send private message Send e-mail MSN Messenger

PostPosted: Thu Jun 16, 2005 9:02 am     Reply with quote

It work fine,,,

Thank you very much
_________________
Best Regards
Daniel H. Sagarra
La Plata (Argentina)
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group