Add data validation to the program segment of Exercise 35 to check that the user enters only
Question:
Add data validation to the program segment of Exercise 35 to check that the user enters only positive integer values.
Data from Exercise 35
Write pseudocode that will average a list of numbers input by the user. Use the following variables:
● Number As Integer
● Sum As Integer
● Average As Float
● Count As Integer
Also:
● Use a While loop to enter the numbers.
● Use a sentinel to test when the user wants to stop entering numbers.
● Assume the user enters valid data.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 70% (10 reviews)
Declare Number As Integer Declare Sum As Integer D...View the full answer
Answered By
Ali Khawaja
my expertise are as follows: financial accounting : - journal entries - financial statements including balance sheet, profit & loss account, cash flow statement & statement of changes in equity -consolidated statement of financial position. -ratio analysis -depreciation methods -accounting concepts -understanding and application of all international financial reporting standards (ifrs) -international accounting standards (ias) -etc business analysis : -business strategy -strategic choices -business processes -e-business -e-marketing -project management -finance -hrm financial management : -project appraisal -capital budgeting -net present value (npv) -internal rate of return (irr) -net present value(npv) -payback period -strategic position -strategic choices -information technology -project management -finance -human resource management auditing: -internal audit -external audit -substantive procedures -analytic procedures -designing and assessment of internal controls -developing the flow charts & data flow diagrams -audit reports -engagement letter -materiality economics: -micro -macro -game theory -econometric -mathematical application in economics -empirical macroeconomics -international trade -international political economy -monetary theory and policy -public economics ,business law, and all regarding commerce
4.00+
1+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
Write pseudocode that will average a list of numbers input by the user. Use the following variables: Number As Integer Sum As Integer Average As Float Count As Integer Also: Use a While loop to...
-
Draw a flowchart that corresponds to the program segment of Exercise 37. Data from Exercise Write pseudocode that will average a list of numbers input by the user. Use the following variables: ...
-
What is displayed when the code corresponding to the program segment below is run with the following: (a) X = 4 (b) X = 0
-
1. (a) Label Earth's layers as shown in the diagram below. (1 pt each; 4 pts total) X Y W: X: Y: Z: W (b) Explain how these layers formed (early in Earth's history). (7 pts) Z
-
A hovering vehicle control system is represented by two state variables, and [13] (a) Find the roots of the characteristic equation. (b) Find the state transition matrix Φ(t). 6. -1
-
You place 2.56 g of CaCO 3 in a beaker containing 250. mL of 0.125 M HCl. When the reaction has ceased, does any calcium carbonate remain? What mass of CaCl 2 can be produced? CaCO3(s) + 2 HCl(aq) ...
-
What are the types of internal recruiting?
-
What is the relationship among market segmentation, target marketing, and positioning? What will happen to a companys target marketing and positioning efforts if markets are incorrectly or not...
-
You are invited to a weekend carnival and behind your food truck is a large tree. The tree is down an embankment 100m away. You take measurement and want to know the height of the tree. Use the...
-
Assume that the network in Figure 20.34 (previous problem) uses distancevector routing with the forwarding table as shown for each node. If each node periodically announces their vectors to the...
-
Draw a flowchart corresponding to the pseudocode in Exercise 35. Data from Exercise 35 Write pseudocode that will average a list of numbers input by the user. Use the following variables: Number As...
-
Change the pseudocode of Exercise 35 to allow the user to include all floating point numbers (negative numbers as well). Data from in exercise 35 Write pseudocode that will average a list of numbers...
-
The pendulum consists of a 15-kg solid ball and 6-kg rod. If it is released from rest when 1 = 90, determine the angle 2 after the ball strikes the wall, rebounds, and the pendulum swings up to the...
-
Explain the principle of tandeed in Islam.
-
In Problems 7-18, a sample of paired data gives a linear correlation coefficient \(r\). In each case, use Table 14.10 to determine whether there is a significant linear correlation. Table 14. 10...
-
The national debt is of growing concern in the United States. It reached \$1 billion in 1916 during World War I and climbed to \(\$ 278\) billion by the end of World War II. It reached its first...
-
The following advertisements (adapted from "Caveat Emptor" by Robert Leighton, Games, January 1988, p. 38) show some vastly overpriced items. Read between the lines and identify the item each ad is...
-
In Problems 23-30, find the range and the standard deviation (correct to two decimal places). If you do not have a calculator, find the range and the variance. \(765,766,767,768,769 \)
-
Swartz Inc. enters into the following transactions during 2012: July 1: Paid $10,000 to acquire on the open market $10,000 face value of Gallatin bonds. The bonds have a stated annual interest rate...
-
Graph the following conic sections, labeling vertices, foci, directrices, and asymptotes (if they exist). Give the eccentricity of the curve. Use a graphing utility to check your work. 10 5 + 2 cos 0
-
Consider the 5-bit generator, G = 10011, and suppose that D has the value 1010101010. What the value of R?
-
Suppose two nodes start to transmit at the same time a packet of length L over a broadcast channel of rate R. Denote the propagation delay between the two nodes as d prop Will there be a collision if...
-
Consider the previous problem, but instead suppose these 10 bytes contain a. The binary representation of the numbers 1 through 10. b. The ASCII representation of the letters B through K (uppercase)....
-
The government standard on radiation from electrical devices is 10mW/cm2 (maximum). Assume a laptop computer is found to radiate more than this standard. The electric field inside is measured to be 5...
-
A 2 2 . 8 - m deep pool is filled with oil of density 8 9 5 kg / m ^ 3 . What is the gauge pressure at the bottom of the pool? Part B: What is the force from the okl that exerts on a 0 . 3 5 m x 0 ....
-
Clark was driving his four-wheeler 15 meters per second on a dirt road. It had just rained and there were massive mud puddles on the road. He hits on and it slows him to a speed of 3.7 meters per...
Study smarter with the SolutionInn App