Write pseudocode for a program that prompts a user to enter a number. If the entered number is not a zero (0), your program should display all even numbers that occurs before the entered number. For example, if a user enters a 10, the program should echo the following numbers: 2 4 6 8. Entering a 0 will result in the termination of the program.

Answers

Answer 1

Writing pseudocode for a program that displays even numbers before the entered number.

Pseudocode is as follows:

1. Start the program
2. Initialize a variable "inputNumber" to store the user's input
3. Prompt the user to enter a number and store the value in "inputNumber"
4. While inputNumber is not equal to 0, perform the following steps:
  a. For each number "i" in the range from 2 to inputNumber - 1, do the following:
     i. If i is even (i % 2 == 0), then echo i
  b. Prompt the user to enter another number and store the value in "inputNumber"
5. End the program when inputNumber is equal to 0

To know more about Pseudocode visit:

https://brainly.com/question/13208346

#SPJ11


Related Questions

Open the Rounded Prices query in Design view. Create a new column to round the Retail price of each item to the nearest dollar. Name the field RoundedRetail. Create a new column to display Luxury for all items that have a RoundedRetail value of $100 or more and Everyday for items that are less than $100. Name the field Class. Run the query. Save and close the query

Answers

To round the Retail price of each item to the nearest dollar and create a new column for the RoundedRetail value, and to display Luxury or Everyday based on the RoundedRetail value, a new column named Class can be created.

The query can then be run, saved, and closed.

To create a new column for the RoundedRetail value, open the Rounded Prices query in Design view, and add a new column with the expression 'Round([Retail])' and name it RoundedRetail. To create the Class column, add another new column with the expression 'IIf([RoundedRetail]>=100,"Luxury","Everyday")' and name it Class. Save the changes and run the query to display the new columns. Finally, save and close the query.

The 'Round' function rounds the Retail price to the nearest dollar, and the 'IIf' function creates a conditional statement that displays 'Luxury' or 'Everyday' based on the RoundedRetail value. This query can be useful for categorizing items based on their retail price and can help in analyzing sales data.

For more questions like Data click the link below:

https://brainly.com/question/10980404

#SPJ11

Given: Company has 3 locations: Orlando (4000 hosts) Chicago (2000 hosts) LA (8000 hosts) The goals are: Set up subnets for each location Starting IP address is 192. 100. 0. 0 Assume were assigned a block sufficiently large for our needs Give your answer in the CIDR standard form such as 123. 45. 67. 89/12 - make sure there are no leading zeroes in any of the four octets used in IPV4 format. What is the CIDR notation for the starting address of Chicago

Answers

The CIDR notation for the starting address of Chicago is 192.100.8.0/21.

Since Chicago has 2000 hosts, we need to allocate a block of IP addresses that can accommodate at least 2000 hosts. Using the starting IP address 192.100.0.0, we can create subnets for each location based on the number of hosts required.

For Chicago, we need a subnet mask that provides at least 2000 IP addresses. A /21 subnet mask provides 2048 IP addresses, which is sufficient for our needs. Therefore, we can assign the starting IP address 192.100.8.0/21 to Chicago.

Overall, by using CIDR notation, we can allocate IP addresses efficiently and effectively to each location based on their needs, ensuring that there are enough addresses to accommodate all hosts while minimizing wastage.

For more questions like IP address click the link below:

https://brainly.com/question/31026862

#SPJ11

As a marketing agent , Ericka's job is to help clients identify who their best client are

Answers

As a marketing agent, Ericka's job is to help clients identify who their best clients are by analyzing customer data and behavior to identify patterns and trends that can inform marketing strategies and campaigns.

One of the key ways that Ericka can help clients identify their best clients is by analyzing customer data, such as demographics, purchasing history, and online behavior. By looking at this data, Ericka can identify patterns and trends that can help to identify which customers are most valuable to the client and what their purchasing habits and preferences are.

Another approach that Ericka can take is to conduct market research, such as surveys or focus groups, to gather insights from customers themselves. By asking customers about their preferences, habits, and attitudes, Ericka can gain a deeper understanding of what drives customer behavior and what factors are most important to them when making purchasing decisions.

Once Ericka has identified who the client's best clients are, she can work with the client to develop marketing strategies that are targeted specifically to those customers. This might include personalized messaging, customized offers or promotions, or tailored content that speaks directly to the needs and interests of those customers.

To learn more about Marketing Strategies, visit:

https://brainly.com/question/25492268

#SPJ11

Need help being allowed into this MC YT Server need to know this:

When was Techno's channel made:


A: April 4, 2016

B: October 28, 2013

C: January 7 2017

D: March 25, 2013

Answers

Answer: B

Explanation: <3

Other Questions
On a certain map, 0.4" represents 2 miles. If the actual distance between point A and point B is 8miles, what is the distance in inches between point A and B on the map?(A) 0.8"(B) 1.6"(C) 2"(D) 2.4"(E) 3.6" Which of the following values are solutions to the inequality -8- 4x > 1?4I. - 10 II. - 1O NoneO II onlyO I and IIO II and IIIO I onlyO III only I and IIIO I, II and IIIIII. 6Submit Answer The volume of a box in the shape of arectangular prism can be represented bythe polynomial 8x + 44x + 48, where x isa measure in centimeters. Which of thesemeasures might represent the dimensionsof the box? Which best describes the pattern seen between planet diameter and density?If planets have a high density, they tend to have a smaller diameter. If planets have a high density, then tend to havea larger diameter. There is no pattern between planet density and diameter. NAVEDOD Several countries of Eastern Europe kept a communist form of government after 1989.True False PLS HURRY TIMED !!!! Although Russells ideas about ethics are not discussed, which is the MOST likely description of his position on human behavior?Power goes to those who take it.People should fight when necessary.Logic should rule all human behavior.Justice and equality are core principles. Using composition of functions, determine if the to functions are inverses of each othr. f(x)= square root of x, +4, x>0. g(x) x2-4, x>2. What is explained in this excerpt that is not explained in "The Steam Engine"?A. George Stephenson was joined by other inventors to enhance the design of locomotives. B. George Stephenson's developments made the new railroad commercially successful. C. George Stephenson's genius transformed steam engines to transport passengers and goods. D. George Stephenson conceived of a special road designed to carry the weight of a steam train The change in water level of a lake is shown in the table. How much did the water level change between Weeks 2 and 3? Open the Rounded Prices query in Design view. Create a new column to round the Retail price of each item to the nearest dollar. Name the field RoundedRetail. Create a new column to display Luxury for all items that have a RoundedRetail value of $100 or more and Everyday for items that are less than $100. Name the field Class. Run the query. Save and close the query which statement is true regarding the industry data that a hotel may see on a star report? north america and non-north america hotels see the same exact pages on the str report related to industry data north america hotels will see industry data for market, market class, tract and tract scale non-north america hotels will not see any industry segment data north america hotels will see data for only a single industry segment https://www.galleriaaccademiafirenze.beniculturali.it/opere/david-di-michelangelo/ Iconographic Analysis (300-500 words/2 points):This is an investigation of the imagery and subject matter of the object. It should seek to understand what the work meant to its original audience, and also the history of the iconography or its origins. This analysis may also discuss the objects use or function. This essay seeks to answer the question, what does it mean? A blank provides power to a hydraulic system by pumping oil from a reservoir into the supply lines Suppose that the function g is defined, for all real numbers, as follows. Find g(-5) ,g (-2), and g(-1) !!!PLEASE HELPP!!! Lee y elige. Read about Luis, then select the the word that completes each statement correctly.Luis quiere tener un cuerpo saludable. l hace ejercicio para estar en forma. Cuando hace ejercicio, Luis usa las piernas, los brazos, las manos y el cuello. A Luis le gusta practicar deportes, beber mucha agua y comer alimentos saludables. l tiene hbitos saludables y nunca tiene que tomar medicamentos porque nunca se enferma. Luis tiene buenos hbitos de higiene. Se ducha todos los das, se cepilla los dientes despus de comer y se lava las manos con agua y jabn. Siempre usa desodorante y champ. l descansa ocho horas todos los das y tiene muchas actividades de ocio.Si quieres estar sano como Luis, tienes que dormir bien, levantarte temprano, tener buenos hbitos de higiene y hacer ejercicio. Recuerda, si no quieres tener dolor de cabeza o ir al hospital, come bien y practica deportes.1: Cuando Luis hace ejercicio usa ______ Answers: los dientes -- los brazos -- el pelo2: Luis no tiene que tomar medicamentos porque ____ Answers: tiene hbitos saludables -- se levanta temprano -- tiene muchas actividades de ocio3: Para estar sano necesitas comer bien y ____ Answers: lavarte la cara -- usar desodorante -- practicar deportes4: Un buen hbito de higiene es _____ Answers: visitar al doctor -- comer frutas -- lavarse las manos5: Luis siempre usa desodorante y ____ Answers: crema de afeitar -- champ -- gel Find the distance between the pair of points.(1, 1) and (1, 4)the distance between the pair of points is ____units.q2.find the coordinates of the point for the reflection.(4, 6.2) across the y-axisthe coordinates of the reflection are what are the two major types of mechanical energy and how do you calculate each equations with variables identified? Please help and make sure to explain. Brainliest will be given to best answer before 7:00am EST April 27. If no answer is good then no brainliest. Al (s) + HCl (aq) H2 (g) + AlCl3 (aq) This is an example of:A. Double replacementB. Single replacementC. SynthesisD. Decomposition Find the volume of a figure round the answer to the nearest hundred 4cm 4cm 4cm