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
-
Chart goes to Year 6, but it was cut off. Thanks! 4. Analysis of a replacement project At times firms will need to decide if they want to continue to use their current equipment or replace the...
-
In Question 9, would it make any difference if Schwartzs bank had confirmed the letter of credit and paid the promissory note before Rousseau learned of the supposedly defective shipment? nju5
-
On April 22, 2016, Sandstone Enterprises purchased equipment for $129,200. The company expects to use the equipment for 12,000 working hours during its four-year life and that it will have a residual...
-
The firm originally is 100% financed by equity (Unlevered firm). The EBIT for the firm is $20,000. The cost of capital for this unlevered firm is 10%. The tax rate is 40%. Systematic risk of the...
-
Exhibit 10.4 presents a partial balance sheet for HP3, a creator and manufacturer of computer hardware and software and related services, for its fiscal years ending October 31, 2012 and 2013. a. HP3...
-
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...
-
In Exercises, a. Obtain and interpret the quartiles. b. Determine and interpret the interquartile range. c. Find and interpret the five-number summary. d. Identify potential outliers, if any. e....
-
Absorption linewidth for an absorbing atomic transition. Consider the curves of power transmission T(w) = exp[-2am(w)L] through an atomic medium with a lorentzian resonant transition, plotted versus...
-
EXAMPLE 05.04 Z Write the force and the couple in the vector form (with rectangular/Cartesian components). Use C = 180 N-m and P = 500 N O INDIVIDUAL Submission (IS12) D x 400 mm B C 300 mm A 400 mm...
-
1.XYZ Corporation budgets factory overhead cost of P500,000 for the coming year. Compute for the overhead cost applied to the job. The following data are available: Budgeted annual overhead for...
-
OP Technologies Manufacturing manufactures small parts and uses an activity-based costing system. Activity Materials Assembling Packaging Est. Indirect Activity Costs $65,000 $242,000 $90,000...
-
3. Solve Example 3.7 (Bergman, Lavine, Incropera, and DeWitt, 6th Ed., pp. 129-132, or 7th Ed., pp. 145-149, or 8th Ed., pp. 134-138), but use the finite difference method. T T = 30C Insulation-...
-
A ball is thrown vertically upward with an initial speed of 30 m/s. (a) How long will it take the ball to reach the highest point in its path? (b) How long will it take the ball to return to its...
-
What is the mode?
-
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 payroll register of Ruggerio Co. indicates $13,800 of social security withheld and $3,450 of Medicare tax withheld on total salaries of $230,000 for the period. Federal withholding for the period...
-
All of the following are included on Form 1040, page 1, EXCEPT: The determination of filing status. The Presidential Election Campaign check box. The income section. The paid preparer signature line.
-
Question One: (25 marks) (X) Inc. purchased 80% of the outstanding voting shares of (Y) for $360,000 on July 1, 2017. On that date, (Y) had common shares and retained earnings worth $180,000 and...
Study smarter with the SolutionInn App