answersLogoWhite

0

  1. You want to read the different ages of a group of people until an age of zero is entered. Based on the ages entered, you should count and print how many of the people are old (above 60), how many are middle-aged (from 30 to 60 (inclusive)), and how many are young (below 30). You should then print the category (old, middle-aged, young) that are the most in the group (You may assume that you get a different count for each category
User Avatar

Rawan Sarandah

Lvl 2
3y ago

What else can I help you with?

Continue Learning about Engineering
Related Questions

What is pseudo hardness?

Pseudo hardness is the property of a problem that appears to be hard but can actually be solved efficiently by a specific algorithm or approach. This can lead to false assumptions about the difficulty of the problem.


What is difference between alogrithm and pseudo code?

An algorithm is an abstract set of rules used to solve a specific problem. Pseudocode is just one of many ways to represent an algorithm.


What is pseudo code algorithm for create a linked list with a header and insert a four numbers to the list?

pseudo code algorithm to create a linked list


How to write pseudo code effectively?

To write pseudo code effectively, start by clearly defining the problem and breaking it down into smaller steps. Use simple language and logical structure to outline the algorithm without worrying about syntax. Make sure to include comments to explain the purpose of each step and test your pseudo code to ensure it accurately solves the problem.


What are the ways representing an algorithm?

You can represent an algorithm by three different ways: 1. Pseudo Code 2. Structured flow charts 3. Actual code


What are the key considerations when solving the pseudo-polynomial knapsack problem efficiently?

When solving the pseudo-polynomial knapsack problem efficiently, key considerations include selecting the appropriate algorithm, optimizing the choice of items to maximize value within the weight constraint, and understanding the trade-offs between time complexity and accuracy in the solution.


What is the difference between implementation and algorithm?

An algorithm is a instruction for solving a problem. It is typically illustrated using prose, pseudo code or flowcharts, but other methods exist. The algorithm is the "here's how it's going to work" part of the solution. An implementation (of an algorithm) is a specific expression of this algorithm, using a specific programming language or any other suitable means. The implementation is the "here's how I've done it" part of the solution.


Differentiate algorithm to pseudo-code?

An algorithm is a step-by-step procedure or formula for solving a specific problem or performing a task, often expressed in a language-agnostic manner. Pseudo-code, on the other hand, is a high-level, human-readable description of an algorithm that uses a mix of natural language and programming constructs to outline the logic without adhering to the syntax of any specific programming language. While algorithms focus on the logic and sequence of operations, pseudo-code serves as an intermediate representation that simplifies understanding and implementation in actual code.


How can i write pseudo code for C plus plus if i haven't even wrote the program yet?

You are going about this backwards. First, define the program. Second, describe its algorithm. Third, if needed, write pseudo code. (Sometime, algorithm and pseudo code is the same process.) Fourth, or third, write real code.


What is pseudo authenticity?

The most contradictory statement in discourse.


How do you change algorithm to program code?

Ah yes, the eternal question on structured design and top-down coding.First, you need to understand the algorithm you intend to use. Write down English-like statements that describe the steps., etc., to arrive at a solution. If you can't describe what you want to do then chances are you don't understand the algorithm.Then, translate the English-like statement/paragraph into something called pseudo-code. Pseudo-code is a mixture of the English-like statement you provided and close to the grammar of the computer language you are translating to.Then, step by step, change the individual steps from your pseudo-code example into the exact grammar of the computer language you are using. Finally, take all of the variables you have declared along the way and define them.Voila! You now have the corresponding computer program that represents the algorithm you described earlier.


In pseudo-code the if-then statement is an example of?

B. Decision StructureTony Gaddis