Write code that stores all odd numbers between -6 and 38 into an array using a loop.
Question:
Write code that stores all odd numbers between -6 and 38 into an array using a loop. Make the array’s size exactly large enough to store the numbers.
Then, try generalizing your code so that it will work for any minimum and maximum values, not just -6 and 38.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 84% (13 reviews)
Code that stores all odd num...View the full answer
Answered By
Muhammad Umair
I have done job as Embedded System Engineer for just four months but after it i have decided to open my own lab and to work on projects that i can launch my own product in market. I work on different softwares like Proteus, Mikroc to program Embedded Systems. My basic work is on Embedded Systems. I have skills in Autocad, Proteus, C++, C programming and i love to share these skills to other to enhance my knowledge too.
3.50+
1+ Reviews
10+ Question Solved
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Question Posted:
Students also viewed these Computer science questions
-
You can access every element of an array using a ______________. a. While loop b. For loop c. Either of the above d. None of the above
-
Just to make sure youve gotten enough practice using the different formulas in this chapter, lets try a challenging exercise with them. Very little information is given in the following table, but...
-
Write a program that stores names and telephone numbers in a database. Write another program that stores names and addresses in a database. Modify the programs to use external, conceptual, and...
-
The following set of dotplots with overlaid boxplots gives the number of pairs of flip-flops students said they owned for 13 males (top) and 37 females (bottom) in a statistics class. The five-number...
-
The average specific heat of the human body is 3.6 kJ/kg oC. If the body temperature of an 80-kg man rises from 37oC to 39oC during strenuous exercise, determine the increase in the thermal energy...
-
The following is a list of 24 Marcos Pizza stores in Lucas County. The stores are identified by numbering them 00 through 23. Also noted is whether the store is corporate owned (C) or manager owned...
-
Water is pumped between two tanks as shown in Fig. P8.32. The energy line is as indicated. Is the fluid being pumped from \(A\) to \(B\) or \(B\) to \(A\) ? Explain. Which pipe has the larger...
-
As a hospital administrator of a large hospital, you are concerned with the absenteeism among nurses' aides. The issue has been raised by registered nurses, who feel they often have to perform work...
-
A ladybug starts at the center of a 12-in.-diameter turntable and crawls in a straight radial line to the edge. While this is happening, the turntable turns through a 45 angle. (a) Draw a sketch...
-
Shown below are the top food and drug stores in the United States in a recent year according to Fortune magazine. Company Revenues ($ billions) Kroger ...........66.11 Walgreen ..........47.41...
-
What elements does the array numbers contain after the following code is executed? int[] numbers = new int[8]; numbers[1] = 4; numbers[4] = 99; numbers[7] = 2; int x = numbers[1]; numbers[x] = 44;...
-
Write a method called isSorted that accepts an array of real numbers as a parameter and returns true if the list is in sorted (nondecreasing) order and false otherwise. For example, if arrays named...
-
A researcher wanted to conduct a survey of major companies to find out what benefits are offered to their employees. She mailed questionnaires to 2500 companies and received questionnaires back from...
-
Describe the elements of the communication process. Why is communication so important for sports marketers? What is the relationship between communication and promotion?
-
What are the risks associated with reducing the price of sports products? Describe two common types of price discounting.
-
Define feedback. How is feedback delivered to the source of the message?
-
Define promotion and then discuss each of the promotion mix elements.
-
Describe the different types of competitive environments. Why is competition considered one of the most critical factors influencing pricing?
-
A spider hangs from a strand of silk whose radius is 4.0 10-6 m. The density of the silk is 1300 kg/m3. When the spider moves, waves travel along the strand of silk at a speed of 280 m/s. Ignore the...
-
On January 1, 2018, Khalid Ltd., which follows IAS 17, entered into an eight-year lease agreement for three dryers. Annual lease payments for the equipment are $28,500 at the beginning of each lease...
-
What is the purpose of the SNMP trap message?
-
In Section 5.7 we saw that it was preferable to transport SNMP messages in unreliable UDP data-grams. Why do you think the designers of SNMP chose UDP rather than TCP as the transport protocol of...
-
What are the purposes of the SNMP Get Request and Set Request messages?
-
J is going to receive a 30-year annuity of 8,500 and L is going to receive perpetuity of 8,500. If the appropriate interest rate is 6%, how much more is L's cash flow worth?
-
. Assume that over the past 88 years, U.S. Treasury bills had an average return of 3.5% as compared to 6.1% on long-term government bonds. What was the average risk premium on the long-term...
-
The following data were gathered to use in reconciling the bank account of Bradford Company: Balance per bank $ 18,050 Balance per company records 10,040 Bank service charges 50 Deposit in transit...
Study smarter with the SolutionInn App