Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
Pseudocode
Author Message
boycey1991

Posted: Wed Jan 13, 2016 8:04 am   Post subject: Pseudocode

I need to write the pseudocode for the following scenario and then write a Java program for it, but pseudocode is one of the things I just cannot wrap my head around. Even just using plain English instead of pseudocode would be helpful just to get the basic steps!

The scenario:

Lottery ticket = One ticket has up to 4 selections per ticket, each selection has 6 numbers (so selection 1 = 2, 5, 1, 8, 9, 22. Selection 2 = 22, 45, 25, 35, 39 etc). Every week 6 numbers are pulled up as winning lottery numbers, so this week for example the winning lottery numbers are: 1, 5, 11, 16, 22, 55.

The prizes work like this (with example prizes), 3 winning numbers = £10, 4 winning numbers = £100, 5 winning numbers = £1000 and 6 winning numbers = £10000

Find the maximum number of winning tickets?

How many tickets have 3 or more winning numbers?

Find the total amount of money that has been won (so the total winnings for all winning cards, as some cards would have won more)

How many tickets do you need to guarantee a win?

How do you get a winning number from the pool?

What is the possibility of earning money on each ticket?

How much winnings can you get from one ticket ?

Tony

Posted: Wed Jan 13, 2016 2:14 pm   Post subject: RE:Pseudocode

If you are having trouble explaining to someone else what to do, how do you hope to get to step 2 and explain it all again, but with all of the additional requirements and constraints that are Java?
Tony's programming blog. DWITE - a programming contest.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 2 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: