Write a program that prompts the user for five 32-bit integers, stores them in an array,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that prompts the user for five 32-bit integers, stores them in an array, calculates only the sum of the ODD values of the array, displays the sum on the screen. In addition, this program prompts the user for a 32-bit integer and display if the array contains this value or not. We suppose that we deal only with unsigned integer. Your code must be composed with the following procedures. 1. Main procedure 2. Prompt user for multiple integers 3. Calculate the sum of the ODD values of the array 4. Display the sum 5. Prompt user for an integer, fetch it into the array and display on screen "Exist" or "Not Exist" Write a program that prompts the user for five 32-bit integers, stores them in an array, calculates only the sum of the ODD values of the array, displays the sum on the screen. In addition, this program prompts the user for a 32-bit integer and display if the array contains this value or not. We suppose that we deal only with unsigned integer. Your code must be composed with the following procedures. 1. Main procedure 2. Prompt user for multiple integers 3. Calculate the sum of the ODD values of the array 4. Display the sum 5. Prompt user for an integer, fetch it into the array and display on screen "Exist" or "Not Exist"
Expert Answer:
Answer rating: 100% (QA)
Below is a simple Python program composed of different procedures as per your requirements python de... View the full answer
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Posted Date:
Students also viewed these algorithms questions
-
Convert the decimal number (123.456)10 into the following indicated bases: (a) Binary number (b) Octal number (c) Hexadecimal number (1 Mark) Q2: Convert the decimal number 456 to binary in two ways:...
-
A sled plus passenger with total mass 39 kg is pulled 17 m across the snow (k = 0.19) at a constant velocity by a force directed 25 above the horizontal. a. Calculate the work of the applied force W...
-
Three charges are placed as shown in the figure below. A scale is provided for the distances. Match the numerical values with the appropriate force of interaction. 19=8c a. b. 9=-2C I'm 93=4...
-
Knight Co. owned 80% of the common stock of Stoop Co. Stoop had 50,000 shares of $5 par value common stock and 2,000 shares of preferred stock outstanding. Each preferred share received an annual per...
-
At the end of Section 8.2, we noted that we always round up when calculating the minimum sample size for a confidence interval for with a specified margin of error and confidence level. Using the...
-
Describe common legal issues for behavioral health professionals.
-
Activity-based costing flexible-budget variances for finance-function activities. FastGrocery.com an online company that delivers groceries to its customers has the following information for its...
-
A stock just paid a dividend of $1.00. Its dividends are paid annually and are expected to grow 6.00% per year. The stock is trading for $26.50 today. What is the forward dividend yield (D1 / P) on...
-
Draw the positive-, negative- and zero-sequence diagrams for the network and then do the follo A. Determine Zbus(pos), Zbus(neg) and Zbus(zero). B. Calculate the fault-currents on all the buses for...
-
how to get the cash flow table, discount rate table, PV table, and accumulated cash flow table in excel? year 0 1 2 3 4 5 6 7 K K K K K K K K TC TR K 1,502,400,000.00 K 1,502,400,000.00...
-
A certain lake is stocked with 10,000 fish. The population is growing according to the logistics 10,000 curve: p where t is measured in months since the lake was initially stocked. 1 9e 5 a. Find the...
-
Consider the biochemical reactor X2 = |B+; B+yx + (1 -B- y)x X2 x = -( - 1)x 1)x + + ( - x)u [B+yx + (1 - By)x Let a = 23, p = 0.39, and y = 0.57. Construct and discuss the phase portrait in the x >...
-
[a] Given the following data: xi Y; 1 1.25 1.5 1.75 5.10 N 5.79 6.53 7.45 8.46 Construct the least squares approximation of the form y-a ex, then find y(2.5). [b] Use best approximation for the first...
-
LJ, married, has two dependent minor brothers. He is a partner of a general professional partnership. He is also engaged in trading business of his own. The following data were provided by LJ in...
-
86000 Compute the smallest natural number congruent to (16 5 207 13 11 954 + 7) (mod 4). Hint: think before trying brute force. You don't need a calculator. O (a) 3 O (b) 2 O (c) 0 (d) 1
-
Explain the buyers position in a typical negotiation for a business. Explain the sellers position. What tips would you offer a buyer about to begin negotiating the purchase of a business?
-
Suppose that the following variables referring to the classes from the previous problem are declared: Pond var1 = new Bay(); Object var2 = new Ocean(); Which of the following statements produce...
-
Assuming that the following variables have been declared: evaluate the following expressions: a. str1.length() b. str1.charAt(7) c. str2.charAt(0) d. str1.indexOf("o") e. str2.toUpperCase() f....
-
Write code that generates a random integer between 0 and 10 inclusive.
-
Where does the management accounting function fit into an organizations structure?
-
What are the ethical responsibilities of management accountants?
-
Diana Corporation provides the following information for 2017: Calculate the total manufacturing costs incurred in 2017. Beginning inventory of direct materials, 1/1/2017 Purchases of direct...
Study smarter with the SolutionInn App