Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Algorithm and Programming problen Write an algorithm in pseudocode that has the objective of separating a list of positive integers provided by the user into

Algorithm and Programming problen
Write an algorithm in pseudocode that has the objective of separating a list of positive integers provided by the user into two groups: (1) even numbers (multiples of 2 ) and (2) odd numbers (not multiples of 2). The list can have any number of terms and will be fed by the user, one by one, until he decides to write -1. You could test your program with the following list: 2, 4, 1, 6, 3, 5, 13, 15, 17, 8, 10, 12, and 9. The program should run for any number of numbers in the list. An example of the run is:
OUTPUT
Enter a positive number: 2
The number 2 is even
Enter a positive number: 4
The number 4 is even
Enter a positive number: 1
The number 1 is odd
.... etc.
Enter a positive number: -1
BYE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago