You are Here: Home >< GCSEs

# I need help with a Visual Basic project for GCSE watch

1. Anyone know how to create a program that you enter your loyalty card number,expiry date, name and postcode. It has to check if the card has expired, if the loyalty card number is valid by:
Allowing the user to enter the 8 digits
Removing the 8th digit and storing it as Check_digit
Reversing the numbers
Multiplying the 1st 3rd 5th and 7th digits by 2
^If the result is greater than 9 then subtract 9 from the result
Add together the resulting 7 digits
Finally check if the sum of the added digits plus the check_digit is divisible by 10
Anyone able to help me
2. How far have you managed to get with this? It would help if you could specific about which part of this you're stuck on, including the code you've tried to solve each problem, any errors, or detail about what isn't working. .

Is this a Console app or a GUI program? If it's a GUI program Have you attempted to create the visual layout in a Form using the appropriate controls? If it's a console program, do you know how to read input from the user and write out to the console?

Take each of the program's requirements one step at a time, and make sure you compile + run your program as often as possible after every tiny change to make sure you stay on top of any errors. Don't try to solve everything at once.

If a problem seems too complex, break it down into something smaller and just solve one part of that problem on its own, then move on to the next piece of that problem, and so on. For example, if the user types in 8 digits, do you know how to get the 8th digit of the user's input? Then do you know how to remove that digit or get the other 7 remaining digits?

If you get stuck with specific problems in Visual Basic, such as any compiler errors, or you need some simple examples such as how to get some data from a user, google for the thing you're trying to do, and you'll be very likely to find a lot of examples and tutorials online which match the problem you're having. You might also find a lot of useful answers to Visual Basic programming questions on https://www.stackoverflow.com/ from people who have gotten stuck in the same way as you before.
3. How would I put an expiry date on the card. So say i want the expiry date to be tomorrow 1/3/18 how would i do that and validate whether or not their card is valid or not?
4. TBH im a beginner at programming, but break it down:

- You need to validate to have numbers or special characters only
- It has to be equal to or greater than the date today
5. Also I have done calculations so how do i make sure all 7 numbers plus the 8th(stored in a variable) are divisible by 10?
6. (Original post by TDevlin172)
How would I put an expiry date on the card. So say i want the expiry date to be tomorrow 1/3/18 how would i do that and validate whether or not their card is valid or not?
You can help users choose a date on a UI using the DateTimePicker control:
https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx

(Original post by TDevlin172)
Also I have done calculations so how do i make sure all 7 numbers plus the 8th(stored in a variable) are divisible by 10?
You can use the Mod operator to check whether two numbers are evenly divisible - https://docs.microsoft.com/en-us/dot...s/mod-operator

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: March 11, 2018
Today on TSR

### He lied about his age

Thought he was 19... really he's 14

### University open days

Wed, 25 Jul '18
2. University of Buckingham
Wed, 25 Jul '18
3. Bournemouth University
Wed, 1 Aug '18
Poll
Useful resources

## Study tools

### Essay expert

Learn to write like a pro with our ultimate essay guide.

See where you can apply with our uni match tool

### Make study resources

Create all the resources you need to get the grades.

### Create your own Study Plan

Organise all your homework and exams so you never miss another deadline.

### Resources by subject

From flashcards to mind maps; there's everything you need for all of your GCSE subjects.

### Find past papers

100s of GCSE past papers for all your subjects at your fingertips.