Sequenza di Fibonacci
Ora creeremo la "sequenza di Fibonacci" in Visual Basic.
Numero | Tipo | Text |
1 | Form | Sequenza di Fibonacci |
1 | Button | Avvia |
1 | Textbox | |
1 | Label | Inserire quanti numeri della sequenza si vuole |
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If (TextBox1.Text < 45) Then
Dim n As Integer
Dim n1 As Integer = 1
Dim n2 As Integer = 1
Dim n3 As Integer = 0
Dim conta As Integer = 0
Dim ris(100) As Integer
Dim risultato As String
n = TextBox1.Text
While conta < n
n3 = n2
n2 = n1 + n2
n1 = n3
ris(conta) = n2
conta += 1
End While
For i = 0 To n - 1
risultato += ris(i) & " "
Next
MsgBox(risultato)
Else
MsgBox("inserire un valore inferiore a 45")
End If
End Sub
End Class
An outstanding share! I have just forwarded this onto a coworker who has been conducting
a little homework on this. And he in fact bought me dinner due to the fact that I found it for him…
lol. So allow me to reword this…. Thanks for the meal!!
But yeah, thanks for spending time to discuss this
matter here on your website.
Glad I could help you, if I can help even you can also send an email to nuovomondosoftware@gmail.com, or leave a comment to the “Aiuto Algoritmi” page.
Wonderful blog! Do you have any suggestions for aspiring writers?
I’m planning to start my own site soon but I’m a little lost on everything.
Would you propose starting with a free platform like WordPress or go for a paid option? There are
so many options out there that I’m totally overwhelmed
.. Any suggestions? Appreciate it!
Wordpress is a good solution, even if it’s free does not mean it’s not good. If you want some help in the graphic personalization and site dynamic contact me on nuovomondosoftware@gmail.com
I used to be recommended this website by means of
my cousin. I’m no longer certain whether or not this post is written by means of him as nobody else realize such
special about my difficulty. You’re incredible! Thank you!
Thank you so much!!.
Link exchange is nothing else except it is simply placing the other person’s
website link on your page at suitable place and other person will also do similar for you.
Great weblog right here! Also your site quite a bit up very fast!
What web host are you using? Can I get your affiliate hyperlink in your host?
I want my site loaded up as quickly as yours lol
contact me on nuovomondosoftware@gmail.com