Initialize Random generator
Initialize allIngredients array - make it a jagged array
Initialize numIngredients = 0
Initialize allBurritos array - array of arraylists
Declare oneBurrito arrayList
Declare specificIngredientIndex
Declare specificIngredient
Initialize burritoPrice = 0
FOR index1 = 0 to 24
Allocate memory oneBurrito arrayList
Initialize burritoPrice = 3.00
Initialize specificIngredient = ""
Randomly generate a number from 5 to 9
Set numIngredients to the randomly generated number in the previous step
-Add the string "Burrito " & (index1 + 1) to the oneBurrito arrayList
FOR index2 = 0 to (numIngredients - 1)
Randomly generate a number between 0 and numIngredients
Set the specificIngredientIndex value to the randomly generated number from the previous step
Set specificIngredent to allIngredients[index2][specificIngredientIndex]
IF the specificIngredient does NOT start with "no "
THEN
burritoPrice = burritoPrice + .50
ELSE
IF the specificIngredient starts with "no "
THEN
burritoPrice = burritoPrice + .00
ENDIF
ENDIF
Add specificIngredient to the oneBurrito arrayList
ENDFOR
Add burritoPrice to oneBurrito
Add oneBurrito arrayList to allBurritos array
ENDFOR
FOR index3 = 0 to 24
Allocate memory to burritoOrder arrayList
Add allBurritos[index3] to burritoOrder
FOR index4 = 0 to (size of burritoOrder - 1)
Display contents of burritOrder at index4
ENDFOR
ENDFOR
chipotlejr's Introduction
chipotlejr's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.