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
  • Learn & ask questions
Solved

Word Values

Posted on 2011-09-30
3
175 Views
Last Modified: 2012-05-12
Please list all 3,4, and 5 letter words whose word values are 30
0
Comment
Question by:isogram7
  • 2
3 Comments
 

Author Comment

by:isogram7
ID: 36890451
If a=1, b=2, c=3
0
 
LVL 11

Accepted Solution

by:
G_H earned 500 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

Open in new window


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

GH
0
 

Author Closing Comment

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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp syntax 3 56
Get hold of longitude and latitude in iframe string 11 48
Connection to multiple databases 13 25
alert(innerHTML); 8 32
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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/…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question