Hi all!
I need help with Visual Basic..
vb.png

Write a program that reads 3 integers numbers, then the program prints the square and cube of each.
i want a one button and one label in form
and the result i want in label .
and thank you all

Re: help with Visual Basic 80 80

Please read the Daniweb posting rules and try again. We will not do your homework for you. Show us what you have so far and where you are stuck.

Re: help with Visual Basic 80 80

This answer in array I want to answer in random please.

Dim NumOfIntegers() As Integer = {1, 2, 3, 4, 8}
        Dim x, y As Integer
        For Each num As Integer In NumOfIntegers
            x = num ^ 2
            y = num ^ 3
            MessageBox.Show("Square Of " & num & " = " & x & vbCrLf & "Cube Of " & num & " = " & y)
        Next
Re: help with Visual Basic 80 80

What do you mean by random?
Or do you have trouble with the button event click handler?

Re: help with Visual Basic 80 80

Your codes are quiet correct. To display as you desire you have to add string values through a loop to the label text property and do label's AutoSize property to False at design time or by code.

Label1.Text=Nothing
For Each num As Integer In NumOfIntegers
                   Label1.Text &= String.Format("Square Of {0} = {1}{2}Cube Of {0} = {3}{2}",num,num^2,vbcrlf,num^3)
Next
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.