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
-
Do you see any dangers with rebates from the manufacturers viewpoint? As a consumer, would you prefer a rebate to a price reduction, or does it make any difference? A rebate is a promise by a...
-
What are bride service, bridewealth, and dowry?
-
During 2014, Fargo Company purchased land for $375,000. It paid $125,000 in cash and signed a $250,000 mortgage for the rest. The company also sold for $95,000 cash a building that originally cost...
-
ABC, Inc. uses a periodic inventory system and reported $300,000 of inventory as of December 31, 2014. Upon reviewing the company's records, the auditor noted the following items which may have been...
-
A body of mass m is thrown straight up with velocity vo. Find the velocity v' with which the body comes down if the air drag equals kv2, where k is a constant and v is the velocity of the body.
-
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...
-
How should the disposal of a component of a business be disclosed in the income statement?
-
A familial data gathering form which includes, age, health status, and family tree of the client and the clients family members allows the personal financial planner to determine which of the...
-
The member should disclose, in writing, the compensation the member, the members firm, or affiliates will receive for services rendered or products sold. The disclosure should include: I. Amount of...
-
Define politics and explain how politics differs from power.
-
Which of the following is not a PFP service? A. Designing financial strategies. B. Identifying personal financial goals and resources. C. Making personalized recommendations. D. Preparing individual...
-
Write a static method max3() that takes three int arguments and returns the value of the largest one. Add an overloaded function that does the same thing with three double values.
-
Kelso Electrical's inventory records for industrial switches indicate the following at November 30, 2017: Nov. 1 Beginning inventory ........... 14 units at $160 8 Purchase...
-
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)....
-
You will make a post giving your point-of-view (PoV) on a brand's activities and/or marketing campaign. Give your PoV on what brands can and should do to ensure they are creating a great digital...
-
IM.83 A distribution center for a sporting goods retailer places orders with manufacturers for a variety of items. Among these is a popular standard skateboard, targeted to first-time skate boarders....
-
[5] 5. Determine the area of the shaded region, if the radius of each circle is 5 cm.
Study smarter with the SolutionInn App