Lost Password?


Go Back   CodeCall Programming Forum > Software Development > Visual Basic Programming

Visual Basic Programming Discussion forum for Visual Basic, an event driven programming language and associated development environment from Microsoft for its COM programming model.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-18-2007, 03:18 PM
endrezr endrezr is offline
Newbie
 
Join Date: Oct 2007
Posts: 6
Rep Power: 0
endrezr is on a distinguished road
Default "decrypting" letters - help

HI

I need help to write a program that tells wich letter is used instead of wich number, that is:

donald
+gerald
--------
robert
the idea is that the program find's out what number is a, b, etc..

or at least links to some useful pages

thanks

Last edited by endrezr; 10-18-2007 at 03:26 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 10-18-2007, 04:10 PM
Lop's Avatar   
Lop Lop is offline
Speaks fluent binary
 
Join Date: May 2006
Posts: 1,149
Rep Power: 18
Lop will become famous soon enoughLop will become famous soon enough
Default

You are looking for the ascii conversion of the letters? Use the ASC() function to convert characters into the ascii code.
__________________
Lop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-19-2007, 09:44 AM
endrezr endrezr is offline
Newbie
 
Join Date: Oct 2007
Posts: 6
Rep Power: 0
endrezr is on a distinguished road
Default

In details, I was thinking of something like this:
in visual basic:
for i1=1 to 9 do
A=i1
for i2=1 to 9 do
B=i2
for i3=1 to 9 do
B=i3
(etc. for all the letters that are important for this case)

if (100000*D+10000*O+1000*N+100*A+10*L+D)+
+(100000*G+10000*E+1000*R+100*A+10*L+D)=
=(100000*RG+10000*O+1000*B+100*E+10*R+T) then
the program displays the found values for each letter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-19-2007, 12:15 PM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 3,405
Last Blog:
wxWidgets is NOT code ...
Rep Power: 37
WingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to behold
Default

What you just put would be the basic logic.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Programming is a branch of mathematics.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-19-2007, 02:56 PM
endrezr endrezr is offline
Newbie
 
Join Date: Oct 2007
Posts: 6
Rep Power: 0
endrezr is on a distinguished road
Default

Private Sub cmdStart_Click()
Dim D As Double
Dim O As Double
Dim N As Double
Dim A As Double
Dim L As Double
Dim G As Double
Dim E As Double
Dim R As Double
Dim B As Double
Dim T As Double
'Dim i1 As Double

'Dim i2, i3, i4, i5, i6, i7, i8, i9, i10 As Double



For D = 1 To 9
Next D
For O = 1 To 9
Next O
For N = 1 To 9
Next N
For A = 1 To 9
Next A
For L = 1 To 9
'L = i5
Next L
For G = 1 To 9
'G = i6
Next G
For E = 1 To 9
'E = i7
Next E
For R = 1 To 9
'R = i8
Next R
For B = 1 To 9
'B = i9
Next B
For T = 1 To 9
'T = i10
Next T
If (100000 * D + 10000 * O + 1000 * N + 100 * A + 10 * L + D) + (100000 * G + 10000 * E + 1000 * R + 100 * A + 10 * L + D) = (100000 * R + 10000 * O + 1000 * B + 100 * E + 10 * R + T) Then
'MsgBox (D & "is D")
txtD.Text = D
End If

'MsgBox ("A=" & i1)

End Sub


I did this, but at the end the txtD.Text stays empty, why????
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 10-19-2007, 03:29 PM
endrezr endrezr is offline
Newbie
 
Join Date: Oct 2007
Posts: 6
Rep Power: 0
endrezr is on a distinguished road
Default

Here is the new version:

Private Sub cmdStart_Click()
Dim D As Double
Dim O As Double
Dim N As Double
Dim A As Double
Dim L As Double
Dim G As Double
Dim E As Double
Dim R As Double
Dim B As Double
Dim T As Double
'Dim i1 As Double

'Dim i2, i3, i4, i5, i6, i7, i8, i9, i10 As Double



For D = 1 To 9
For O = 1 To 9
For N = 1 To 9
For A = 1 To 9
For L = 1 To 9
For G = 1 To 9
For E = 1 To 9
For R = 1 To 9
For B = 1 To 9
For T = 1 To 9
If (100000 * D + 10000 * O + 1000 * N + 100 * A + 10 * L + D) + (100000 * G + 10000 * E + 1000 * R + 100 * A + 10 * L + D) = (100000 * R + 10000 * O + 1000 * B + 100 * E + 10 * R + T) Then
'MsgBox (D & "is D")
txtD.Text = D
End If
Next T
Next B
Next R
Next E
Next G
Next L
Next A
Next N
Next O
Next D



MsgBox ("A=" & A) 'for example to diplay the num value of A

End Sub
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 10-19-2007, 04:34 PM
Lop's Avatar   
Lop Lop is offline
Speaks fluent binary
 
Join Date: May 2006
Posts: 1,149
Rep Power: 18
Lop will become famous soon enoughLop will become famous soon enough
Default

And the new version works?
__________________
Lop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 10-20-2007, 04:25 AM
endrezr endrezr is offline
Newbie
 
Join Date: Oct 2007
Posts: 6
Rep Power: 0
endrezr is on a distinguished road
Default

not realy, because for example d cannot be equal to r.
so I made this changes, but it still doesn't work all the way:
Private Sub cmdStart_Click()
Dim D As Double
Dim O As Double
Dim N As Double
Dim A As Double
Dim L As Double
Dim G As Double
Dim E As Double
Dim R As Double
Dim B As Double
Dim T As Double


For D = 1 To 9
For O = 1 To 9
For N = 1 To 9
For A = 1 To 9
For L = 1 To 9
For G = 1 To 9
For E = 1 To 9
For R = 1 To 9
For B = 1 To 9
For T = 1 To 9
If D <> O And D <> N And D <> A And D <> L And D <> G And D <> E And D <> R And D <> B And D <> T Then
If O <> N And O <> A And O <> L And O <> G And O <> E And O <> R And O <> B And O <> T Then
If N <> A And N <> L And N <> G And N <> E And N <> R And N <> B And N <> T Then
If A <> L And A <> G And A <> E And A <> R And A <> B And A <> T Then
If L <> G And L <> E And L <> R And L <> B And L <> T Then
If G <> E And G <> R And G <> B And G <> T Then
If E <> R And E <> B And E <> T Then
If R <> B And R <> T Then
' Beep ( I've put this here just to see if the program executes tis far)
If B <> T Then

If (100000 * D + 10000 * O + 1000 * N + 100 * A + 10 * L + D) + (100000 * G + 10000 * E + 1000 * R + 100 * A + 10 * L + D) = (100000 * R + 10000 * O + 1000 * B + 100 * E + 10 * R + T) Then MsgBox (D & O & N & A & L & G & E & R & B & T) 'txtD.Text = D 'MsgBox (D)
'txtD.Text = D
'Else

End If
End If
End If
End If
End If
End If
End If
End If
End If
Next T
Next B
Next R
Next E
Next G
Next L
Next A
Next N
Next O
Next D
End Sub


at the end I dont get the messagebox, any ideas?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
These are taken from real resumes and cover letters and were printed in the 7/27/97 priorityone The Lounge 7 01-29-2007 12:00 PM


All times are GMT -5. The time now is 06:21 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads