Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

# Word Values

Posted on 2011-09-30
Medium Priority
180 Views
Please list all 3,4, and 5 letter words whose word values are 30
0
Question by:isogram7
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2

Author Comment

ID: 36890451
If a=1, b=2, c=3
0

LVL 11

Accepted Solution

G_H earned 1500 total points
ID: 36891113
Hi,

Enjoyed this...

``````Function WordValue(Input)
WordTotal = 0
Input = UCase(Input)
for i = 1 to len(Input)
Char = Mid(Input, i, 1)
LetterValue = Asc(Char) - 64
WordTotal = WordTotal + LetterValue
response.write LetterValue & "<br/>"
next

WordValue = WordTotal
End Function

TestWord = "ff"

if len(TestWord) > 5 then
response.write "WordTooLong"
elseif len(TestWord) < 3 then
response.write "WordTooShort"
elseif WordValue(TestWord) = 30 then
response.write "Success: " & TestWord & " works!"
else
response.write "WordNot30"
end if
``````

I think you may need to do more error checking for non-alpha's maybe...

GH
0

Author Closing Comment

ID: 36972416
formula provided; expected list-not sure how to follow through. thank you anyway
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Loops Section Overview
###### Suggested Courses
Course of the Month8 days, left to enroll