Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (1)

Powered by Vanilla. Made with Bootstrap.
IO SmashtheStack Level02
  • Xin
    Posts: 3,251
    ---[IO SmashtheStack Level02

    First lets navigate to /levels and execute level02
    ./level02
    Append the 39th through 42nd numbers in the sequence as a string and feed it to this binary via argv[1]. 1, 2, 3, 5, 8, 13, 21...
    The 4th through the 7th numbers would give you 581321


    This number sequence is a Fibonacci number where the number is the sum of the two previous numbers. Basically it wants us to find the values of number 40,41,42,43 in the sequence and put them together. I have written a little program to find these values.

    Module Module1

    Sub Main()
    Dim no1 As Integer
    Dim no2 As Integer
    Dim temp As Integer
    no1 = 0
    no2 = 1

    For i = 1 To 43
    temp = no1 + no2
    If i = 40 Then
    Console.WriteLine(temp)
    ElseIf i = 41 Then
    Console.WriteLine(temp)
    ElseIf i = 42 Then
    Console.WriteLine(temp)
    ElseIf i = 43 Then
    Console.WriteLine(temp)
    End If
    no2 = no1
    no1 = temp
    Next
    Console.ReadLine()

    End Sub

    End Module


    The output of this was
    102334155
    165580141
    267914296
    433494437


    So lets execute the code and see what we get...
    ./level02 102334155165580141267914296433494437


    We now get the following response
    Win.
    sh-3.2$


    See you in /level03 ;)
    Xin