Hey there! Sign in to join this conversationNew here? Join for free

Anyone good at console applications on visual studio express? Watch

Announcements
    • Thread Starter
    Offline

    0
    ReputationRep:
    I need help to figure out how to do EAN-8 check digit but i am having so many problems could someone please help me??Name:  Check digit basis.png
Views: 47
Size:  217.2 KB
    Online

    17
    ReputationRep:
    My thoughts:
    Create a 2d array of integers.
    First row is the first 7 digits
    2nd row will contain the corresponding sums.

    Write a for loop that calculates the sums for the 2nd row. Times by 3 for first iteration then 1 for the next.Flip a Boolean flag on each iteration to figure out whether you should times by 3 or 1

    Add up all the sums that should now be stored in the 2nd row. Subtract from nearest multiple of 10. That's the 8th digit.

    You should only need the 1 for loop.
    • Thread Starter
    Offline

    0
    ReputationRep:
    Thanks thats helped a lot could you show how to do the boolean flag?
 
 
 
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    How are your GCSEs going so far?
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Quick reply
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.