Jump to content

LCD display acm

RexLee
Go to solution Solved by Ciccioo,

LC displays are made of 7 segments, like this

 

display.gif

 

so, for each digit you have to display, you need to know how to "draw" the 7-segments version of it

you can do this by just storing the on/off state of each segment for each digit, or you can do it like it's done in the solution you found and store what to draw in the place where the segment is

 

edit:

it's shortly explained in the code too, am i missing the part that you actually didn't understand?

The problem is: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=647

But the way I solved it isn't efficient.

So I found a solution on the web: http://code.google.com/p/acm-uva-ufrgs/source/browse/trunk/%20acm-uva-ufrgs/Problem%20Set%20Volumes/Volume+VII/706.c?r=2

But I don't understand the conversation table in the source code.

Link to comment
Share on other sites

Link to post
Share on other sites

LC displays are made of 7 segments, like this

 

display.gif

 

so, for each digit you have to display, you need to know how to "draw" the 7-segments version of it

you can do this by just storing the on/off state of each segment for each digit, or you can do it like it's done in the solution you found and store what to draw in the place where the segment is

 

edit:

it's shortly explained in the code too, am i missing the part that you actually didn't understand?

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×