Results 1 to 3 of 3

Thread: Algorithm in Visual Basic

  1. #1
    New Member
    Join Date
    Jan 2019
    HSC
    2019
    Gender
    Undisclosed
    Posts
    16
    Rep Power
    1

    Question Algorithm in Visual Basic

    .
    Last edited by nakappe; 5 Feb 2019 at 4:13 PM.

  2. #2
    617 pages fan96's Avatar
    Join Date
    May 2017
    HSC
    2018
    Gender
    Male
    Location
    NSW
    Posts
    437
    Rep Power
    2

    Re: Algorithm in Visual Basic

    your pseudocode is logically correct (if you intended the "count+1" to be outside of the IF statement) but you have some syntax errors.
    Code:
    BEGIN
        count = 0
        present = 0
        GET advent
        WHILE advent has not ended
            IF advent[count] = "Present" THEN
                present = present + 1
            ENDIF
            count = count + 1
        ENDWHILE
    END
    as for the actual code you'll need to know the structure of the text file (i.e. how exactly the presents are stored) in order to successfully write the program.
    HSC 2018: English Adv. [80] • Maths Ext. 1 [98] • Maths Ext. 2 [95] • Chemistry [87] • Software Design [95]

    ATAR: 97.40 | Uni Course: Advanced Mathematics (Hons) / Engineering (Hons) at UNSW

  3. #3
    New Member
    Join Date
    Jan 2019
    HSC
    2019
    Gender
    Undisclosed
    Posts
    16
    Rep Power
    1

    Re: Algorithm in Visual Basic

    Thank you for your reply. What do you mean by "You'll need to know the structure of the text file"??

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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