Multiplication Table By Using Loops?

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


ADVERTISEMENT

While Loop On Multiplication Table?

Dec 1, 2010

how to use the while loop in multiplication??

View 2 Replies

Make A Multiplication And Sum Table Only Form 1 To 12?

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

Multiplication Table In A Label Control?

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

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

Create A Hash Table Using A Multiplication Method?

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

Create A Multiplication Table And It Has To Contain A Postest Loop

Apr 12, 2009

I have to create a multiplication table and it has to contain a postest loop. For example:

[Code]...

View 1 Replies

Multiplication Table That Input X / Y As Columns And Rows

Aug 20, 2010

How can I program a multiplication table that will input the x and y as columns and rows.

View 4 Replies

Command Button To Display A Multiplication Table In List Box

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

Write A Program To Display A Multiplication Table For The Integers From 1 To 4

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

Multiplication Table In VB - Popup Input Box To Ask The User To Enter A Number

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

Monthly Payment Calculation, For Loops To Do While Loops?

Oct 8, 2011

the purpose of the program is to display the monthly payments on the loan.My homework is to use do while loops instead of for loop.Here is the code for the for loop.

Option Explicit On
Option Strict On
Option Infer Off

[code].....

Now I'm having some trouble displaying the output using the do while loop, and I'm pretty sure it's a loop problem on my code. However, I cannot seemed to find out what's wrong. I looked at the examples of do while loop in my textbook, but I couldn't find anything useful to my problems of my program.This is the output for the do while loop.

Here's the do while loop code

Option Explicit On
Option Strict On
Option Infer Off

[code].....

View 3 Replies

Contain Functions(They All Have For Loops) Don't Work In For Loops?

Mar 6, 2011

When I use a For loop in a For loop the Contains Statement dosen't work! Even my custom one! I even tested mine and it works 100% And neither that or the String.Contains function work inside of For Loops And, I know both of them use loops to search through a string.

My function(It will atleast search once):

Function RealContains(ByVal load As String, ByVal needle As String) As Boolean
load = load.ToLower

[CODE].....................

View 10 Replies

VS 2008 Database Search - Using SQLClient That Loops Though All Users In A Users Table

Dec 29, 2010

I've got a code using SQLClient that loops though all users in a Users table inside each loop i want to preform another search in the UserOrders table, thus doing a count of all orders.

I get this error

HTML

There is already an open DataReader associated with this Command which must be closed first.

Here is my code

vb.net UserLists.Items.Clear()
Dim connection As New SqlClient.SqlConnection(My.Settings.ConnectString)
Dim command As New SqlClient.SqlCommand("SELECT * FROM Users ORDER BY PersonName",

[CODE]...

View 3 Replies

.net - .Net And Multiplication Of Singles?

Nov 12, 2009

Dim result as single = 0
result = CType("8.01", Single) * 100 ' result=801.0 as expected
result = CType("8.02", Single) * 100 ' result=802.000061 --- not expected
Further to the above
result = 8.02 * 100 ' result = 802.0 as expected

View 4 Replies

Using Multiplication In If And Then Statements?

Oct 5, 2009

I am very new VB .NET and just starting If statements. My problem is: Write an If statement that determines whether the variable CurrentBalance is greater then 1000.01. If it is, multiply the variable CurrentBalance by 1.005. Otherwise, multiply CurrentBalance by 1.007.So far I have

Sub Main()
Dim currentBalance As Boolean
System.Console.WriteLine("Enter Current Balance: " & currentBalance)
If CDbl(currentBalance) > 1000.01 Then

[code].....

I really don't even know if thats how I should be starting. Not sure what to put after the first Then on how to make it multiply currentBalance by 100.5.

View 5 Replies

Make Multiplication Syntax?

Jan 29, 2010

This is part of a calculator program. I first part I sort by num and sign using a multitude of commandbuttons with no parenthesis.This program below is part of the second part. I have three more subroutines for /, +,- respectively.The + and - work correctly but * and / do not.I think it is in the line: numop(m) = g * h Is there something I am doing wrong wth the syntax in multiplication?

Public str, sign(100), numstr(100) As String
Public num1lock(100), m, n As Integer
Public ans, num(100), numop(100), g, h As Long


[code].....

View 4 Replies

Winforms - Multiplication Using FOR Loop?

May 13, 2012

How do I multiply inside loop using this code ?

Dim a As Integer
Dim b As Integer
a = inputBox("Enter first Number:")
b = inputBox("Enter second Number:")

and I want the answer to be shown in a label.

View 2 Replies

Losing IntWeight Variable For Multiplication?

Apr 16, 2012

I'm new to VB and programming in general and have not had too much trouble however i cannot figure this problem out and i've been working on it for a week. basically i have to create a program that calculates the mass of someone on another planet with the conversion numbers as constant, an input box for the user's mass, using select case format and output to a label including the name of planet ie "Your mass on &strPlantet is x" so what happens is my intWeight variable becomes zero and the lblResult is Zero. (i have not added the all the code for the label output) oh yeah i must also use a try/catch structure to prevent non numeric data from being input.[code]

View 20 Replies

Multiplication Game In VB Trouble Shoot

Feb 16, 2011

This is my assignment for tonight. If anyone can enlighten me as to why it doesn't work. I

know I haven't finished the timer, I trying to get results in the labels.[code...]

View 3 Replies

Simple Calculator Multiplication And Division?

Jan 30, 2010

Simple Calculator multiplication and division Trying to make a simple calculator. My program inputs numbers and arithmetic operations thru commandbuttons. The numbers, num(n-+1), are odd and the operations, op(n), are even. The code is based on the even op string. Every time a op occurs it is stored in numop(n) to be accessed later. I have all the other operations in sequential order: "*"," "/, "+" and "-". The other similar For-Next loop are the same just interchange the two * for /, +and -. The "+" and "-" work fine in this configuration.

My problem is the multiplication and division does not occur. The numbers and operations line up. The numop(m)=g*h should yield numop(m)=num(1)*num(3). Is there some sort of code to be inserted to accomplish these multiplication and division operations?

[Code]...

View 7 Replies

VS 2005 Performing The Multiplication With Timespan?

Aug 20, 2009

I am trying to multiply timespan by an integer....

Private Sub wtothrs0_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles wtothrs0.MouseClick
Dim temp As TimeSpan = TimeSpan.Parse(ttothrs0.Text) + TimeSpan.Parse(wetothrs0.Text)
wtothrs0.Text = temp.ToString

[code]....

i gives the error mes "Input string was not in a correct format."

View 14 Replies

Arrays Multiplication Using SumProduct WorkSheet Function?

Apr 28, 2012

I would like to multiply two single dimenssion arrays, having 5 elelments in each.

I prefer to use the SumProduct WorkSheet function.

I wrote this kind of line (below) but got a run time error #1004.

X = Application.WorksheetFunction.SumProduct(Array_1, Array_2)

I would like X to be the sum of the elelment multiplication of the two arrays/

View 1 Replies

Change / Convert The Result Of The Division Or Multiplication?

Nov 15, 2011

How do I change / convert the result of the division or multiplication examples of the division = 200,1247 becomes 200,12 (2 decimal) I use this coding corrected my code is

[Code]...

View 3 Replies

Access Database Field Manipulation (multiplication Of 2 Fields)?

May 20, 2008

I want to open an Access database and I want to multiply 2 fields between each other. I am a newbie and till now I only have found the way to open the access database and create my Recordsets. So, for example, if I have table Mytbl that is a recordset with 4 fields (columns) and I would like to multiply column 3 with column 4 and put the results in a new Recordset, do I have to do it by multiplying each and every record

View 4 Replies

ComboBox - Set Labels And Scale Multiplication Factors For XY Grid

Jun 28, 2010

I have some combo boxes that basically set labels and scale multiplication factors for an XY grid. The combo boxes themselves work as they should. Two adjust scale levels of the XY grid (label and multiplication factors) the other changes the Y axis units (Imperial/Metric). The issue comes when I try to replot old data... I have the data in the array and have confirmed it is accurate...but...

When I apply the appropriate value to combobox.selectedindex and then call the Sub that actually makes the scale changes, the selected index reverts to -1. Small Example.... (note consider all variables as public and all routines in a single class - ignore spelling - this is a quick subset recreation not a copy).

Private Sub ReloadGraph()
combobox1.selectedindex = LengthScale(GraphNumber)
Call LengthLabels()
PlotUnits = Units(GraphNumber)
Call UnitsSet()
[Code] .....

OK - so I did add some code..... I did not actually run this code, but this is essentially a snapshot of what fails....when I step through line by line, the selectedindex changes to -1 as soon as I step to the second line of the second 2 Subs BEFORE it processes the second line (i.e. always after I step off Private Sub xxx() ). Again, both UnitSet and LengthLabels work OK separately when called, it is ONLY when I set the selectedindex from a variable (and again, it DOES set OK) and then call these routines that the selectedindex goes to -1. I have read a bunch of stuff relating to selectedindex and selectedvalue resetting IF one or the other is blank, but I have tried setting both in testing and this fails too!!

View 9 Replies

Countdown - Performing Addition / Multiplication On Entered Number

Sep 20, 2009

I have made an countdown app that is working in a normal way (added picture of it). Now when I select a number in the numeric box and click start, it starts to count down from that many minutes, but what I want is the number I put in the box *3. So if I put in 3 (points) the counter will count down 9 minutes. If it is possible I want a counter at the bottom every 3 minutes the value of the 000 at the bottom of the image multiply by 1 (+1 for every 3 mins timer1 runs).

View 8 Replies

Create A Multiplication Square For Any Size The User Enters?

Oct 2, 2009

Im using Visual Basic 2005."Devise a program to create a multiplication square for any size the user enters, up to a maximum of 10x10. The program should output something like this for a 4x4 square.

1234
2468
36912
481216

You will need to make use of the RichTextBox, along with concatenation to make the output format correctly within the box.When you have created the working program, document it properly by printing out and annotating the code to explain how it works."

View 4 Replies

Create A Tiny Calculator Using The Basic Operators Of Addition - Subtraction - Multiplication

Oct 31, 2011

I need to create a tiny calculator using the basic operators of Addition, Subtraction, Multiplication, and Division. My professor hasn't really covered much of this, so I'm not to sure how to create it.

View 6 Replies

Windows Form Multiplication Test Loop, Math And Cath Very Simple Program?

Nov 26, 2010

I think for you my problem is very simple..I have done the same program in console mode without problem, now i try into windows form...

I generate by random 2 number A&B I multiply them and I will compare it with the result in my textbox3

if it the same as the computer has calculated il will show you congratulation, however i will say try again

I have a problem to calculate the sum, A&B are well generated but nothing in Calc Result

When Calc was working when I write nothing in the textbox3 and i click on Verify it show the msgbox congratulation.I'm looking just for this step, I've fixed the other issues And another things When It's right I would like to random another number for A&B after closing the msgbox, how can I processd ?

[Code]...

View 3 Replies







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