Results 1 to 6 of 6

Thread: Help Code about Loop, Paying.

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2018
    Posts
    1

    Cool Help Code about Loop, Paying.

    Hello! I just want to ask if anyone wants to code one of these problems from me? its about Looping. Paying $20!

    Thank you!
    Attached Images Attached Images   

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,481

    Re: Help Code about Loop, Paying.

    Activity 10. Pennies for pay... That's what you get if you don't do your own homework

  3. #3
    Fanatic Member
    Join Date
    Aug 2004
    Location
    Essex, UK
    Posts
    750

    Re: Help Code about Loop, Paying.

    #8 - put a listbox on a form and then put this code in the form load event:

    Code:
    For degC As Integer = 0 To 20
                Dim degF As Double = degC * 1.8 + 32
                ListBox1.Items.Add(degC & " degrees C = " & degF & " degrees F")
            Next
    Now why not try to learn something by doing the rest yourself? Come back here if you have a specific coding query. Oh, and forget the $20 ...

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,043

    Re: Help Code about Loop, Paying.

    You can get help here for free, but you have to show some effort. We don't do your homework, nor should we. If you don't want to learn, that's up to you. However, $20 wouldn't pay for much of anything for most anybody here.
    My usual boring signature: Nothing

  5. #5
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: Help Code about Loop, Paying.

    Quote Originally Posted by Shaggy Hiker View Post
    You can get help here for free, but you have to show some effort. We don't do your homework, nor should we. If you don't want to learn, that's up to you. However, $20 wouldn't pay for much of anything for most anybody here.
    Yeah that would barely cover a pack of smokes and a six pack!!!

  6. #6
    Lively Member
    Join Date
    Apr 2009
    Posts
    73

    Re: Help Code about Loop, Paying.

    Did problem #9 Population increase

    Code:
            Dim Day As UInteger = 1
            Dim PopulationPercentage As Decimal = 2
            For Day = 1 To 10
                TextBox1.Text = TextBox1.Text & "Day = " & Day & " Population = " & PopulationPercentage & vbNewLine
                PopulationPercentage = PopulationPercentage + (PopulationPercentage * 0.3)
            Next
    Outputs

    Code:
    Day = 1 Population = 2
    Day = 2 Population = 2.6
    Day = 3 Population = 3.38
    Day = 4 Population = 4.394
    Day = 5 Population = 5.7122
    Day = 6 Population = 7.42586
    Day = 7 Population = 9.653618
    Day = 8 Population = 12.5497034
    Day = 9 Population = 16.31461442
    Day = 10 Population = 21.208998746
    Here is problem #11 Ocean levels (i think its right if ocean levels first year is 0)
    Code:
            
            Dim Year As UInteger = 1
            Dim MillimetersPerYear As Decimal = 1.5
            For Year = 1 To 10
                TextBox1.Text = TextBox1.Text & "Year = " & Year & " Millimeters Increase= " & MillimetersPerYear & vbNewLine
                MillimetersPerYear += 1.5
            Next
    Outputs
    Code:
    Year = 1 Millimeters Increase= 1.5
    Year = 2 Millimeters Increase= 3
    Year = 3 Millimeters Increase= 4.5
    Year = 4 Millimeters Increase= 6
    Year = 5 Millimeters Increase= 7.5
    Year = 6 Millimeters Increase= 9
    Year = 7 Millimeters Increase= 10.5
    Year = 8 Millimeters Increase= 12
    Year = 9 Millimeters Increase= 13.5
    Year = 10 Millimeters Increase= 15
    5

    Here is problem #13 fibonacci sequence (i think its wrong because i cannot go up to 100 i stopped at 48)

    Code:
            Dim fib1 As Long = 0
            Dim fib2 As Long = 1
            Dim row = 1
            Dim column = 1
    
            For i As Integer = 0 To 47
                Dim temp As Long = fib1
                fib1 = fib2
                fib2 += temp
                If row > 12 Then
                    column += 1
                    row = 1
                End If
                TextBox1.Text = TextBox1.Text & "Row: " & row & " Column: " & column & " Fib #: " & fib1.ToString & vbNewLine
                row += 1
            Next
    Output
    Code:
    Row: 1 Column: 1 Fib #: 1
    Row: 2 Column: 1 Fib #: 1
    Row: 3 Column: 1 Fib #: 2
    Row: 4 Column: 1 Fib #: 3
    Row: 5 Column: 1 Fib #: 5
    Row: 6 Column: 1 Fib #: 8
    Row: 7 Column: 1 Fib #: 13
    Row: 8 Column: 1 Fib #: 21
    Row: 9 Column: 1 Fib #: 34
    Row: 10 Column: 1 Fib #: 55
    Row: 11 Column: 1 Fib #: 89
    Row: 12 Column: 1 Fib #: 144
    Row: 1 Column: 2 Fib #: 233
    Row: 2 Column: 2 Fib #: 377
    Row: 3 Column: 2 Fib #: 610
    Row: 4 Column: 2 Fib #: 987
    Row: 5 Column: 2 Fib #: 1597
    Row: 6 Column: 2 Fib #: 2584
    Row: 7 Column: 2 Fib #: 4181
    Row: 8 Column: 2 Fib #: 6765
    Row: 9 Column: 2 Fib #: 10946
    Row: 10 Column: 2 Fib #: 17711
    Row: 11 Column: 2 Fib #: 28657
    Row: 12 Column: 2 Fib #: 46368
    Row: 1 Column: 3 Fib #: 75025
    Row: 2 Column: 3 Fib #: 121393
    Row: 3 Column: 3 Fib #: 196418
    Row: 4 Column: 3 Fib #: 317811
    Row: 5 Column: 3 Fib #: 514229
    Row: 6 Column: 3 Fib #: 832040
    Row: 7 Column: 3 Fib #: 1346269
    Row: 8 Column: 3 Fib #: 2178309
    Row: 9 Column: 3 Fib #: 3524578
    Row: 10 Column: 3 Fib #: 5702887
    Row: 11 Column: 3 Fib #: 9227465
    Row: 12 Column: 3 Fib #: 14930352
    Row: 1 Column: 4 Fib #: 24157817
    Row: 2 Column: 4 Fib #: 39088169
    Row: 3 Column: 4 Fib #: 63245986
    Row: 4 Column: 4 Fib #: 102334155
    Row: 5 Column: 4 Fib #: 165580141
    Row: 6 Column: 4 Fib #: 267914296
    Row: 7 Column: 4 Fib #: 433494437
    Row: 8 Column: 4 Fib #: 701408733
    Row: 9 Column: 4 Fib #: 1134903170
    Row: 10 Column: 4 Fib #: 1836311903     <- here is the answer lol idk why its here but ya thats what it says
    Row: 11 Column: 4 Fib #: 2971215073
    Row: 12 Column: 4 Fib #: 4807526976
    I'll take 6$ if you want
    paypal: sales@highgamer.com
    Last edited by pkedpker; Dec 7th, 2018 at 05:32 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width