Program That Throws Out A String Of Six Numbers From 1 To 37?

Feb 12, 2012

I have a program that throws out a string of six numbers from 1 to 37, what I need to do is check the the string for for a format you could say.I need to make sure the set of six numbers doesn't contain 4 or more numbers of the same numbers from the same set of ten(s).

Like this:I can't have: 1-3-6-7-8-12 Or 12-14-16-18-20-21 Or 21-23-26-28-30-31 Or 30-32-34-36-20-22

I can have : 1-3-6-12-17-23
////////////: 12-14-16-20-21-22
////////////: 20-1-13-23-26-30
////////////: 1-37-22-33-30-9

[Code]...

View 5 Replies


ADVERTISEMENT

Program To Randomly Select Numbers For A Bingo Caller - Prevent Reversed Numbers Being Selected

Mar 6, 2011

I have just about completed a .NET project to write a program to randomly select numbers for a Bingo caller. Over the last month or so Ive learned a lot about .NET but heres something that I consider to be odd and maybe one of you guys can offer an opinion.

One of the features of calling Bingo in a small local club is that callers often use little sayings to accompany certain numbers, I expect youve all heard of (say) All the sixes, clickety click for 66 or 5 and 9 the Brighton line for 59 etc. My little program gives an option to incorporate these with a prompt for the caller that can be edited outside of the program. One of these conventional sayings is used when a number is reversed 12 followed by 21 or 45 followed by 54 for example, when the caller might call (say) 1 and 2, one dozen, number 12 And the other way round 2 and 1, twenty one.

So, I programmed in a bit of code to detect this and to over-ride whatever might otherwise have been the quote with And the other way round and set about testing it. Ive been through literally dozens of full 90 calls watching for the occurrence of a reversed number, spent a few hours doing it, and not once has it occurred which is to say the least, unusual.

So, Im wondering about the Rand Function, could it be that it isnt possible for a reversed number to be selected? Just so you know, I randomly pre-select the order of all 90 numbers, I fill each of the 90 elements of an array with a random number first checking that the number selected hasnt already been stored, if it has, I just get the next random number (and check that too of course), but I cant see how that could prevent reversed numbers being selected, especially in light of the fact that frequently it's not the 'next' number that's used.

View 39 Replies

Make A Program That Will Calculate Sum Of Consecutive Numbers Between Two Given Numbers

Jun 4, 2012

I'm trying to make a program that will calculate the sum of consecutive numbers between two given numbers. [code]

View 13 Replies

Asp.net - Appending String Variable Text After Appending A Line Throws System.OutOfMemoryException?

Sep 28, 2011

I'm appending string variable text after appending a line throws System.OutOfMemoryException?
Can any one explain why it is throwing error.

str+="something Text"
str+="something Text"

and lastly I assign it to a lable text When I assign the value of str it throws exception.....

View 2 Replies

String Registers All As A String And Doesn't Actually Calculate Random Numbers

Jun 12, 2011

The string itself contains things like "random" & random.next(1,3) & "random2" etc. The string registers all of this as a string and doesn't actually calculate random numbers.Is there any way to fix this?

View 8 Replies

Converting A String Of Letters To A String Of Numbers?

Apr 10, 2009

I'm having a problem converting a string of letters to a string of numbers. I've tried:

Dim A As String = ""
Dim strOutput As String = ""
Dim X As Integer = 0

[Code].....

View 4 Replies

Getting Numbers From A String?

Sep 29, 2009

I know you can just use integer.parse to convert a string to a integer, but I need something else.I have a String like this:

001010000000101

Now what I need to do is place al those digits in a array like this:

Dim example() As Integer = {0,0,1,0,1,0,0,0,0,0,0,0,1,0,1}

What I am doing now is this:

Dim text As String = "001010000000101"
Dim collection(15) As Integer = Nothing
For i = 0 To text.Length - 1

[code]....

View 7 Replies

Getting The Sum Of A String Of Numbers?

Nov 17, 2011

i do have a medium knowledge of Python, HTML/CSS. I am working on my first basic program. a simple calculator. Buttons representing numbers 0-9 Buttons with + - x / = and a clear button.

So what ive done is created a string, and when the user hits the button, it adds that value to the string (hit buton 4, it adds a 4, hit the minus, it adds a -)
i need a "function" that grabs that string, uses logical math on it, to determine the answer. I know in Python you can use: Eval(STRING NAME)is there an equivelant for VB?

View 1 Replies

Last Numbers From A String?

Aug 25, 2010

I need a vb function to determine the last numerical characters in a string. For example, if the string is Step1, I need it to return 1. If the string is Step32, I need it to return 32.I'm aware of the string functions like Right, Instr, etc but I'm just not sure how to get what I need

View 1 Replies

Check If A String Contains Only Numbers?

May 26, 2011

Dim number As String = "07747(a)" If number.... Then endif I want to be able to check inside the string to see if it only has number, if it does only contain numbers then run whatever is inside the if statment? What check do i use to check if the string only contains numeric and no alpha ot () etc ..? What i am trying to check for is mobile numbers, so 077 234 211 should be accepted, but other alphas should not be

View 3 Replies

Extract Numbers From A String?

May 9, 2009

I included all the code this time. In calculate click event the value is zero and I don.t understand where I went wrong. My work is due tomorrow, if anyone can tell me why I can not extract the price from the string. What this program is doing is taking items from the stockListBox and adding them to the shoppingList Box then extracting the price from the shoppingListBox and adding the prices together.

0
Public Class SupplyCalculator
Dim lists As String = "staple" & "stapler" & "folder" & "notebook" & "pencil" & "eraser" & "pen" & _

[Code].....

View 1 Replies

Extracting Numbers From String?

May 9, 2009

This is my second post on this topic. I included all the code this time. In calculate click event the value is zero and I don't understand where I went wrong. My work is due tomorrow, if anyone can tell me why I can not extract the price from the string. What this program is doing is taking items from the stockListBox and adding them to the shoppingList Box then extracting the price from the shoppingListBox and adding the prices together.t a note- in public class I changed the string and seperated the price from the item, not sure if I was suppose to do that.lso, everything works except the calculate event.

0
Public Class SupplyCalculator
Dim lists As String = "staple" & "stapler" & "folder" & "notebook" & "pencil" & "eraser" &

[code].....

View 2 Replies

Have A List Containing One String And Two Numbers?

Jan 28, 2011

Can I have a List containing one string and two numbers? Or I can only have one type of element?

View 3 Replies

How To Remove Numbers From A String

Nov 29, 2009

How can you remove number from a sting. The numbers could be anywhere in the sting and they could be any combination of numbers but would be together in the string. Ie abcdefg321hijk....

View 4 Replies

Replacing Numbers In A String

Apr 2, 2010

Okay, so I know now how to replace vowels in a string. Is there any way I can use the Select Case similar to the code below to replace all numbers into letter Z.

[Code]...

View 29 Replies

Reverse String Without Numbers?

May 8, 2009

i want to reverse some string with numbers how to reverse it

ex: "ABC 123" --> "123 CBA"
or
"ABC 123 DE" --> "DE 123 CBA"

reverse string without the numbers

View 3 Replies

Search For Numbers In A String?

Aug 27, 2009

I'm working in a program that reads sms from phone I have messages like "You have successfully transferred 100.00 EGP to 20119845844Balance 7555.00Transaction: 4620439" Stord in a string So I need to search the message for the numbers 100.00 , 20119845844 , 7555.0 and 4620439 and it's sure changed every message so the how to search for this Numbers and add every one in variable to use every number of them alone?

View 7 Replies

VS 2008 Get Numbers From A String

Jun 12, 2010

I currently have a string like MondayJohnsRoom1130D I want to split this up so I have Monday - Day of the week JohnsRoom - Room name 1130 - Time D - Means Daily I get given this format from another computer, the room name can vary in size but the last leter D will always be one letter and the time 4 characters.... HOw can I split this up?

View 19 Replies

Compare Numbers In Program?

Mar 26, 2012

Again i am stucked on this: i have googled it but[code]...

View 12 Replies

Perfect Numbers Program?

Nov 6, 2010

So I am trying to solve this program using the algorithm given, and I get no error messages but everytime I execute the program it just crashes. Any idea what I am doing wrong?\The user wants a program that will return a set of perfect numbers based on the value that is given. If the user types in 3, the program will return 3 perfect numbers

So this is the code I have so far...
dim perfectnumber as integer = 2
dim divisorRunningSum As Integer = 2

[code].....

View 1 Replies

.net - Parse Numbers From String Using Regex In .NET?

Feb 16, 2010

I am trying to parse the digits to store in a variable from a string in VB.NET (would like to also include the decimal point).

Here is an example string: Refund issued for $27.74

View 2 Replies

C# - String Format For Numbers Or Currency?

Dec 1, 2010

I need to give comma(,) for every thousends. So I used DataFormatString="${0:#,#}". It is working fine. But when value is 0. It is showing $00. I just want to show only $0.

How can we do that?

View 2 Replies

Extracting Numbers From String Text

Feb 1, 2009

I am trying to extract numbers from string text. e.g. 1 day (8 hours)' I need the one and the eight integers pulled out I would like to extract then store each number separately for use later. I am aware of techniques to count string text, but not pulling certain information from it.

View 7 Replies

How To Add Spaces To Numeric String Every 2 Numbers

Oct 21, 2011

I used a regular expression, which handles both numbers and letters in strings of arbitrary length, in one line of code.
dim rtn as String = Regex.Replace(input, "..", "$& ")

I'd like to take numeric strings of arbitrary length and insert a space every 2 characters.
So 1233456 becomes 12 33 45 6. Is there a way I can use format as string or IFormatProvider, like? That would put a limit on how long the string could be though, right? Since I'm casting to a long.

CLng((input)).ToString("## ")
I'd like to take strings of arbitrary length and insert a space every 2 characters.
123dssas4rr should become 12 3d ss as 4r r

View 4 Replies

How To Separate Alphabets & Numbers From A String

Jan 21, 2010

I like to know to split a string value from a mixed value.[code]Now the result will be "Check".Is there any short ideas?

View 1 Replies

Reading Numbers From File Into A String?

May 1, 2012

i have a number in this format: 123 and I want a select statement such as below for comparsion so i dont have as many if statements:

Select case numbers(i)
case is = "123"
case is = "234"

example but in real scenario numbers are random.

Heres my code in which all select cases dont get fired:

Public Function UserAdd() As String
On Error GoTo Errorhandler
Dim personcount As Integer

[Code]....

But the case is statements above dont fire when I know that number is correct above

View 9 Replies

RegEx - How To Gather All Numbers In String

Sep 4, 2009

I am trying to gather all numbers in this string which is the name of an image file. The name of the string is ABC09072009XYZ777000111.jpg. When I use
Dim rx as new Regex("d")
Console.Writeline(rx.match(input))
It only returns the first set of numbers before the xyz. I need them all.

View 3 Replies

Sorting A String Array With Numbers?

Feb 12, 2010

Lets say I have the following String Array:

Code:
dim strArr(3) as String
strArr(0) = "15 Joseph"
strArr(1) = "24 Nick"
strArr(2) = "3 Mike"

[Code]...

View 2 Replies

String With Numbers And Characters Order By Asc

Dec 15, 2011

I use Visual Basic 2008 with Mysql I have a table article with the following data :

Articlenb - Productcode - amount
1 - XXL - 1
2 - 12 - 1

[Code]......

View 1 Replies

VS 2008 Finding A Set Of Numbers In A String?

Mar 23, 2011

I am needing to locate a given set of numbers in a string, and have limited success, it is almost always finding the numbers that I want, but I need it to be more reliable.Below is a test program that I am using to test with and also 2 picures that may explain better that I can put into words.

[Code]...

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved