need desperate help on vb.net please

D Saunders

New member
Joined
Nov 27, 2005
Messages
4
Programming Experience
Beginner
can you please tell me the code for these exercises:

Exercise 1.

Loops
Design & implement a programme to output the multiplication table for a user input.

E.g. users inputs 3
The programme outputs:
1 * 3 = 3
2 * 3 = 6
3 * 3 = 9
4 * 3 = 12
5 * 3 = 15
6 * 3 = 18
7 * 3 = 21
8 * 3 = 24
9 * 3 = 27
10 * 3 = 30
11 * 3 = 33
12 * 3 = 36


2. Specification: develop an application that receives two integers from the user via text boxes. These numbers are either added, subtracted, divided or multiplied. The result is displayed in a text box. The arithmetic processing of the inputs is achieved using command buttons.
Consider error handling!!

3. Specification: write a command button click event procedure that toggles the size of a button between its original size and double its original size. Ensure that the command button is always positioned exactly in the centre of the form when it is both in its original size and an amended size.

4. Design & implement a programme to calculate & output Prime numbers between 7 and 300
 
Come on be honest, you can't expect us to do your homework for you, can you? But as i'm feeling generous i help with the first bit. Note this is not the best way to do this but it works.
For excercise 1...

You will need a text box to input the number you want the timestable for and button called calculate, and a multiline textbox or something like that.

Then in the onclick event of the button you need to get the value from the textbox and Then do something like this

VB.NET:
Dim i As Integer = CInt(Me.TextBox1.Text)
Dim d As Integer
Dim Str(12) As String
For a As Integer = 0 To 12
d = a * i
Str(a) = CStr(i) + "*" + CStr(a) + " = " + CStr(d)
Next
Me.TextBox2.Lines = Str
 
for #3 that's super easy, simply use the form's height and width properties in conjunction with the button's height and width properties to place it exactly in the center, here's the pseudo-code
VB.NET:
Button Left = (Form Width - Button Width) / 2
Button Top = (Form Height - Button Height) / 2
 
D Saunders said:
can you please tell me the code for these exercises:


You will not properly learn from having others provide solutions for homework. A better method is to try yourself and if you can not solve the problem then ask "how to" along with showing a small segment of your code so that others can point you in the proper direction.
 
kevininstructor said:
You will not properly learn from having others provide solutions for homework. A better method is to try yourself and if you can not solve the problem then ask "how to" along with showing a small segment of your code so that others can point you in the proper direction.
Yup, I agree.
Btw Saunders,you don't need to learn anything if don't wanna try it yourself first. These exercises are pretty basic .Net stuff, so how will you learn advance features then?????
 
Oh come on, We've all cheated a little bit before haven't we when we needed some help?!! No? just me then. Don't get me wrong, i'm all for doing it yourself, but i don't think we're here to judge. So lets not be quite so hard on old D saunders.
 
Cheating is one thing

It's ok to get some help on certain things but this guy has posted 2 entire homework projects and asked for all the work to be done by others. Where do you go to school D that it's so difficult you can't do any of your own work? Also, why would you choose programming if you don't want to learn how to do basic programming?
 
some people take a programming class as a substitute for an even worse class, i dont know in this case, but he/she may verywell have a good reason for being in a programming class and not care about programming at all
 
Back
Top