Multiplication Table With Repetition Structure
May 3, 2011
Here is the problem: In this question, you create an application that displays a multiplication table similar to the following figure, where x is a number entered by the user and y is the result of multiplying x by the numbers 1 through 9. Multiplication Table
[Code]....
View 2 Replies
ADVERTISEMENT
May 11, 2012
I need to stop the execution of a program in VB.net. Within a repeating structure the program checks whether a variable is true or false. When the variable is false I need to stop the program execution. I do not want to close the program but simply stop it. One way I found was raising an exception, but I would not want to display the error message to the user. What is the best way to do it ?
Do
If myvariable=false then
throw new exception... 'Silent exception
end if
Loop until ....
View 3 Replies
Mar 11, 2008
I have an assignment to make a multiplication table using loops. The idea is to make this: If the user enters 3 this is the result he gets:
0 1 2 3
1 1 2 3
2 2 4 6
3 3 6 9
if the user enters 5, this is te result:
0 1 2 3 4 5
1 1 2 3 4 5
2 2 4 6 8 10
3 3 6 9 12 15
4 4 8 12 16 20
5 5 10 15 20 25
[Code]...
View 4 Replies
Dec 1, 2010
how to use the while loop in multiplication??
View 2 Replies
Oct 29, 2010
i'm trying to make a multiplication and sum table only form 1 to 12. I get all kind of error I don't know what to do
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim numMulti, numSum, tCounter, multiSum As Integer
[Code].....
View 5 Replies
Nov 1, 2009
Private Sub btnDisplay_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
Dim intCount = 1
[code].....
View 3 Replies
May 17, 2012
i need to create a hash table using a multiplication method and i need to create an array of linked listso how i can to create array of linkedlist in vb or c# ?
View 1 Replies
Apr 12, 2009
I have to create a multiplication table and it has to contain a postest loop. For example:
[Code]...
View 1 Replies
Aug 20, 2010
How can I program a multiplication table that will input the x and y as columns and rows.
View 4 Replies
Mar 26, 2011
I have a command button to display a multiplication table in list box. the multiplication is from 1 to 5. my problem is, I have to use if else or looping in coding??
View 8 Replies
Apr 27, 2010
My assignment was to Write a program to display a multiplication table for the integers from 1 to 4. So i did the code And got
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim n As Integer
[Code]....
The only problem with the code is that it displays only the integers 1 , 4, 9, and 16 when ran.
View 3 Replies
Mar 21, 2010
I need to code a basic multiplication table in VB. I need a popup input box to ask the user to enter a number, then a label to display the multiplication table for that number from 1 to 9.
[Code]...
View 5 Replies
Aug 7, 2009
I have sql 2005 and I need to print out the structure of a table.Is there a function to print this out.
View 3 Replies
Mar 3, 2009
I have a string array that contains the following:
(Date Type RequestNum)
3/3 xyz 3
3/3 abc 4
[code].....
View 1 Replies
Feb 7, 2011
Is there an easy way to get data from a table in SQL Express and put it into a Structure? The table has one string column and five bit columns. I'm using VB.net
View 13 Replies
Mar 10, 2010
How to Save DataTable Structure And Data Into A Datatbase Table..
View 7 Replies
Sep 25, 2009
I have a User defined table type(UDTT) in Sql 2008 I am writing VB Code to send data to Stored procedure that uses it as a parameter I have found that the datatable i build in VB has have columns in same order as udtt when passing it to SQl from VB Currently I have this roughly
In SQL Server
Create type table my_table
Field1 varchar(10)
Field2 varchar(10)
[Code]....
View 2 Replies
Jan 2, 2012
I have this code:
Dim combinations As New List(Of String)
Dim word As String = "abc"
For c1 = 0 To word.Length - 1
[code].....
View 2 Replies
May 26, 2011
How can I write all possible combinations to the console? For example, if user enters abc, then it will write aaa, aab, aac, abb, abc, acc, bbb, bbc, ccc.
Here's some code:
Dim abc() As String = {"a", "b", "c"} '
Sub Main()
Console.WriteLine("Enter the amount of characters")
[Code]....
View 3 Replies
Jun 2, 2011
the code for adding items in the combo box but without duplicates. i have an assignment which is a simple web browser. the combo box will be the address bar. and everytime i input an address, it will be added in combo box and should not repeat just like in the browsers
View 3 Replies
Jun 2, 2011
I have written an if...else statement which uses an array myArr and a string myStr as follows:
If myArr.Length > 0 AndAlso myArr(0) = "-1" Then
'Do stuff 1
ElseIf myStr= "xyz" Then
'Do stuff 2
ElseIf myArr.Length > 0 Then
[Code]...
It works exactly as I need. But It looks really confusing, mostly because the array length is checked twice. There must be a clearer way to write it, but I can't think of one. the order that each statement is executed is crucial. i.e. Stuff 1 has priority over stuff 2, which has priority over stuff 3.
View 6 Replies
Nov 20, 2009
Say you press and hold down a letter on your keyboard. The first letter gets added, there is a delay and then it repeats quickly on screen. Is it possible to skip this delay and go straight to the repeating part? I realize this might not be a visual basic question as much as a windows question, but if there is some way of toggleing it through my program, or using a workaround, i would like to hear the alternatives ^^ Setting the windows setting to fastest still has a small delay and others users would still experience it on other computers.
View 1 Replies
May 2, 2008
I have a button that when you click executes a certain code, lets say I make a menu that when clicked on should execute the same code, so how can I do this without having to copy/paste the same code twice.
View 10 Replies
Apr 1, 2008
Got a form linked to a database and i have the first column of data appearing in a list box on my form. In the database there are two records with the same value and so, of course, in my list box the value is given twice.How do i remove this repetition from the list box? (still keeping it the same in the database)
View 5 Replies
Aug 27, 2011
i have a listbox which can be updated. and another listbox with some denominations concerning the first listbox. i am populating the listbox directly from the database. each item in the first listbox have many denominations given in the second listbox. the problem is when i add new items into the database, the items of the first listbox repeats. so in ma updated listbox, the items get repeated. how can i avoid this repetition.
[Code]...
View 2 Replies
Jan 20, 2009
The goal is simple... generate a set of random numbers with a certain range (e.g., 1-6, 5-10) with no repeats. I tried using a system with arrays where everytime a number has been generated, its marked as "used" and then the program is required to generate a new number. But it doesn't work!
Public randomnumgen As New System.Random
Public randomnum As Integer
Public iCounter As Integer
Public GotIt(7) As Boolean
[code]....
View 5 Replies
May 27, 2009
I have the following VB.Net 2.0 in an ASP.Net app:
output = Regex.Replace(output, "<p>(?:(?:<!--.*?-->)|&(?:nbsp|#0*160|x0*A0);|<brs*/?>|[su00A0]+)*</p>", String.Empty, RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnoreCase Or RegexOptions.Singleline)
Example stuff it matches well:
<p></p>
<p> </p>
<p><br/><br/></p>
<p><!-- comment --><!-- comment --></p>
[code]....
View 3 Replies
Apr 14, 2010
I'm getting a bit more fluent in VB.Net, but am still a bit green around the edges in certain aspects. I'm creating custom controls, and am starting to rely heavily on AddHandlers to manage them.Until recently, I didn't realize that you can add multiple event handlers for the same control and same address
[code]...
The above code would create 10,000 copies of the same event, and if I would click on combobutton1, the event would fire 10,000 times. I only need to fire the event once, but sometimes my code is a bit circular, and there may be an instance where two or more addhandlers are designated for a given control and address. Is there a way to have a loop on my custom dispose event where it would look something like:
[code]...
Or better yet, remove all events from a control(On a side note, is there any way in the debug mode to see all the active events attached to a control?)
View 2 Replies
Feb 25, 2009
how to validate 4 textboxes so that only numbers 1 to 4 can be entered but no number can be repeated.i already have code but it only validates some of the boxes and allows numbers to be repeated in other
Public Class frmGrid
Private Grid() As Short
Private Const intDimension As Short = 3
[Code]....
View 1 Replies
Aug 12, 2011
this website seems great and this is my first post. Sorry if this has already been answered but I have been searching for a long time. I have a program with a list view in details mode. I have it load column settings (visibility, display index, width, etc.) when the form is opened and save them when closed. There are many columns...about ten so far...like folder, file, size, etc. Is there a way to access variable names from the values of other variables?
[Code]...
View 3 Replies