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
-
A successful businessman in the community has contacted the Moose County Board of Commissioners about donating income producing securities to the County to support a particular activity. Under the...
-
The 1-year interest rate in New Zealand is 6 percent. The 1-year U.S. interest rate is 10 percent. The spot rate of the New Zealand dollar (NZ$) is $.50. The forward rate of the New Zealand dollar is...
-
Given the following information concerning four stocks, a) Construct a simple price-weighted average, a value-weighted average, and a geometric average. b) What is the percentage increase in each...
-
(A) At the point (0.5, 1.5), the direction field has a slope of (B) At the point (-1.5, -1.5), the direction field has a slope of (C) Use your answers above to help choose the correct direction field...
-
If X1 ~ N( , ) and X2 ~ N ( , ) are iid normal random variables, then whats the difference between 2X1 and X1 + X2? They both have normal distributions.
-
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 Occupational Safety and Health Act is a model law created by the American Law Institute. True/False
-
Determine the lengths of all the four links of a four-bar mechanism to generate y = log x in the interval 1x11 for three precision points. The length of the smallest links is 10 cm the range of input...
-
In an epicyclic gear train (Fig. 15.40), an arm carries two wheels A and B having 24 and 30 teeth respectively. The arm rotates at 100 rpm in the clockwise direction. Find the speed of the gear B on...
-
The Three Key Themes in Strategic Cost Management are: i. Value Chain Analysis, ii. Strategic Positioning Analysis, and iii. Cost Driver Analysis REQUIRED: Discuss how these are applied in the...
-
The function g(x) is differentiable. The function h(x) is defined as: h(x) = xg(x) If g(8) = 9 and g'(8) = 2, what is h(8)? Simplify any fractions. h'(8) =
-
In an epicyclic gear train (Fig.15.41) an annular wheel 'A' having 54 teeth meshes with a planet wheel 'B' which gears with a sun wheel 'C', the wheels 'A' and 'C' being co-axial. The wheel B is...
-
The population y (in thousands) of Buffalo, New York, from 2000 to 2014 can be approximated by the model y = 2.60t + 291.7, 0 ¤ t ¤ 14, where t represents the year, with t = 0...
-
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)....
-
Assume the following information: Sales Variable expenses Contribution margin Fixed expenses Net operating income The unit sales to attain a target profit of $188,000 is: Amount Per Unit $ 300,000 $...
-
Crane Corp. Cullumber, Inc. Sales revenue $574,000 $574,000 Variable costs 266,500 153,750 Contribution margin 307,500 420,250 Fixed costs 205,000 317,750 Net income $102,500 $102,500 (a) Compute the...
-
Given the following information: Beginning Balance of Raw Materials $ 6,230.00 Purchaes of Raw Materials $ 17,575.00 Total Raw Materials Available $ 23,805.00 Ending Balance of Raw Materials ?...
Study smarter with the SolutionInn App