Programming 2

Put your programming skills to the test in these challenges.

Programming 2

Post by Esser420 on Thu Dec 03, 2015 2:03 pm
([msg=90842]see Programming 2[/msg])

So basically I have everything in place, my code reads the image and returns the dots and dashes.
I have code to translate it to text but oddly my code returns sequences like "-----" and other strings over the length of 4.
Am I supposed to distinguish "---" and "--" but what order? I think there is something wrong because it never return a slash for sapce.
Esser420
New User
New User
 
Posts: 1
Joined: Thu Dec 03, 2015 1:57 pm
Blog: View Blog (0)


Re: Programming 2

Post by -Ninjex- on Thu Dec 03, 2015 3:42 pm
([msg=90843]see Re: Programming 2[/msg])

viewtopic.php?f=19&t=3993&start=10#p80222

Read that, I assume your count is off somewhere
image
For those that know
K: 0x2CD8D4F9
User avatar
-Ninjex-
Moderator
Moderator
 
Posts: 1691
Joined: Sun Sep 02, 2012 8:02 pm
Blog: View Blog (0)


Re: Programming 2

Post by cyberdrain on Tue Dec 15, 2015 9:59 pm
([msg=90952]see Re: Programming 2[/msg])

In Morse code 5 dots and/or dashes in a row are a number. For 1-5 count the amount of dots from left to right, above that, add the number of dashes to 5 to get the number. The one not containing any dots (-----) is a zero.
Free your mind / Think clearly
User avatar
cyberdrain
Expert
Expert
 
Posts: 2160
Joined: Sun Nov 27, 2011 1:58 pm
Blog: View Blog (0)



Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests