1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lesantik [10]
3 years ago
9

Topic: Pseudo-codes

Computers and Technology
1 answer:
Arisa [49]3 years ago
7 0

Answer:

//program_start

//variable_inicialization

books = 0

maps = 0

magazines = 0

//End variable_inicialization

//operation_selection_routine

display "Select operation: (I) for input item to stock, (O) for output items in stock

operation = read_keyboard_input

IF (operation = "I")

goto input_routine

ELSE IF (operation = "O")

goto output_routine

ELSE

display "Incorrect option, try again"

goto operation_selection_routine

ENDIF

//End operation_selection_routine

//input_routine

display "Insert item code to add to stock"

input_code = read_keyboard_input

IF (input_code >= 1000 & input_code < 2000)

IF (input_code NOT duplicated_in_stock)

 add_to_stock (input_code)

 books = books + 1

 display "Book added"

ELSE

 display "Item Code is already present in stock"

ENDIF

ELSE IF (input_code >= 2000 & input_code < 3000)

IF (input_code NOT duplicated_in_stock)

 add_to_stock (input_code)

 maps = maps + 1

 display "Map added"

ELSE

 display "Item Code is already present in stock"

ENDIF

ELSE IF (input_code >= 3000 & input_code < 4000)

IF (input_code NOT duplicated_in_stock)

 add_to_stock (input_code)

 magazines = magazines + 1

 display "Magazine added"

ELSE

 display "Item Code is already present in stock"

ENDIF

ELSE IF (input_code = 9999)

goto program_end

ELSE

display "Incorrect option, try again"

goto input_routine

ENDIF

goto operation_selection_routine

//End input_routine

//output_routine

display "Items in stock"

display "Number of books: " + books

display "Number of maps: " + maps

display "Number of magazines: " + magazines

goto operation_selection_routine

//End output_routine

//program_end

display "Terminating stock program"

stop_program

Explanation:

Pseudo code is a way to design an algorithm using normal words and terms, that are not specific to any programming language. It is easier to understand how the program works and once finished, can be translated to the desired programming language.

This algorithm uses 5 blocks of code:

*variable_inicialization, where item counters are initially set to zero.

*operation_selection_routine, where the program request user input to select if the user will add an item or show existing items in stock. If an incorrect option is given, it will repeat this same routine.

*input_routine, the program will request the four digit code to add, and will check if it is not already present (to avoid duplicated items), and if the item code belongs to a book, map or magazine, increasing the corresponding item counter. Also, if the code is 9999 it will go to the program_end routine, otherwise it will display an error message and request a new item code. After a valid item code it will return to the operation_selection_routine.

*output_routine, it will display on screen the number of items for each category. Then, returns to the operation_selection_routine.

*program_end, it will simply display a goodbye message and terminate the program.

You might be interested in
Differentiate between time high and time low?
Y_Kistochka [10]
STAR PLATINUM ZA WARUDO... ORA ORA ORA ORA ORA ORA ORA ORA ORA
7 0
3 years ago
Why would you want to look at the HTML code on a website when using a Web
dusya [7]

I would want to look at the HTML code on a website when using a Web page editor to change attributes that the editor cannot change. Text editors like Notepad and TextEdit can not only help you learn HTML, but also get things done for you. However, most web developers prefer using a web page editor over text editors because they can help boost productivity.

Explanation:

For instance, say you want to write an opening HTML tag, a web page editor will automatically include the closing tags, thus reducing the typing required. This can pose as an advantage and a disadvantage. By default, HTML supports various tags and includes the autocomplete feature for attributes. Most developers, not matter how smart or experienced they might be, will constantly run into errors. In as much as a HTML editor autocompletes elements found in attributes for you, developers would want to look at the HTML code on a website. It will help them find and correct syntax and runtime errors

Forgetting to put quotation marks on an attribute values, alone, will cause errors. An editor will not change these errors and a developer will be required to review the code and make changes.

Learn more about page editors

brainly.com/question/10002469

brainly.com/question/4004088

#LearnWithBrainly

8 0
4 years ago
Ursa Major Solar wants to automatically notify a manager about any cases awaiting a response from an agent for more than 2 hours
weqwewe [10]

The feature that the administrator has to use to fulfill this requirement is a  Case Escalation Rule.

The answer to this question is option A.

<h3>What is a case escalation rule?</h3>

This is what is used to reroute a case. It has the ability of passing notifications to a user after a given length of time has gone by.

With this rule the person would be able to make the choice is the case is to be escalated or if it should be passed to a different user.

Read more on the Case Escalation Rule here:

brainly.com/question/14161284?referrer=searchResults

An escalation rule automatically reroutes a case and can notify a user if the case remains open after a certain period of time has passed. With an escalation rule, you can: Choose to escalate a case to a queue or to another user.

3 0
2 years ago
Can somebody hack ur account on Brainly bc I feel like I have bc I have answered waaaaaay more questions than shows on my profil
QveST [7]
It says you’ve only answered 11, but yeah it you’re account CAN be hacked
4 0
3 years ago
What is the entire command for setting the permissions on a file named swlicenses so that the owner has all permissions and grou
leonid [27]

Answer:

Setting the permissions on a file named "swlicenses" so that the owner has all permissions and group and everyone else have only read permissions:

In windows, access the Properties Dialog Box  of the document.

1. Click on the File menu

2. Click Protect document

3. Adjust edit, print, view, etc. permissions

4. Change the permission levels for the users, group, and others on the read, write, and execute permissions.

5. Click 'ok' after setting the required parameters.

Explanation:

To change file and directory permission, you must be the only user or the owner of the file. If you are working in windows, follow the above steps.  Note that you can change the permission for users, group, and others so that they can only read the file instead of writing or executing the program.

4 0
3 years ago
Other questions:
  • Cameron wants to impress the owner of the company. He creates a graph that shows the improved productivity at the company over t
    13·2 answers
  • You have an executive who needs her print jobs handled above those of others. how would you accomplish this advanced printing co
    8·1 answer
  • What does CSS stand for?
    8·2 answers
  • Which of the following is used by a seller to deceive a buyer? a. bait and switch b. contest c. display d. introductory offer
    8·2 answers
  • TCO 10) Voice packets could experience a significant _____ delay in routers and switches when sharing a network with data traffi
    15·1 answer
  • ¿Por qué es importante generar proyectos innovadores?
    8·1 answer
  • What is the primary difference between the windows server 2012 r2 server manager and previous versions (before windows server 20
    11·1 answer
  • Explain paragraph layout
    10·1 answer
  • Any one know??please let me know
    15·2 answers
  • You can change the ____ or position of text within a document's margins.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!