The file problem_3.c contains a working program. The output of the program is an inverse diamond...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The file problem_3.c contains a working program. The output of the program is an inverse diamond pattern. It takes in 'n' as an input and prints 2n-1 lines or rows. A sample output- Ester Process returned 8 (80) execution time 4,589 Press any key to continue. 1. Edit the code to print 'n' lines instead of 2n-1 lines. [1] 2. Write a condition so that the program only accepts odd inputs from 9 to 19. [1] 3. Edit the code for the horizontal line in the middle. [3] 4. Edit the code for the vertical line in the middle. [3] 5. Finally, remove the star from the center. [2] Your output should look like this. Enter an odd number between 9 and 191 15 ******* Process returned 0 (0) execution time: 5.180 Press any key to continue. The file problem_3.c contains a working program. The output of the program is an inverse diamond pattern. It takes in 'n' as an input and prints 2n-1 lines or rows. A sample output- Ester Process returned 8 (80) execution time 4,589 Press any key to continue. 1. Edit the code to print 'n' lines instead of 2n-1 lines. [1] 2. Write a condition so that the program only accepts odd inputs from 9 to 19. [1] 3. Edit the code for the horizontal line in the middle. [3] 4. Edit the code for the vertical line in the middle. [3] 5. Finally, remove the star from the center. [2] Your output should look like this. Enter an odd number between 9 and 191 15 ******* Process returned 0 (0) execution time: 5.180 Press any key to continue.
Expert Answer:
Answer rating: 100% (QA)
include include int main int i j n bool inputChecktrue 2 ... View the full answer
Related Book For
Posted Date:
Students also viewed these computer engineering questions
-
An urn contains 2n balls, of which 2 are numbered 1, 2 are numbered 2, . . . , and 2 are numbered n. Balls are successively withdrawn 2 at a time without replacement. Let T denote the first selection...
-
Your university has an honors program that accepts exactly 40 freshmen each year. Every year before soliciting applications, students are informed of the standards for program participation. The...
-
Write a working code in SQL which takes information from table 1 (named as "Table_1") and table 2 (named as "Table_2") to produce table 3 (named as "Table_3"). Table 1 DistrictID S0001 SD002 SD003...
-
When members of your team coordinate how to prepare the progress report, in which direction is the flow of communication?
-
Refer to the information in RE13-7. Assume that on June 30, Aggie received interest on the Smith Corporation bonds, as well as a $1 dividend per share interest on the Bike Company stock. Prepare the...
-
In Exercises 5 and 6, describe and sketch the surface given by the function. g(x, y) = x
-
A (a) Businesses often create a provision for bad debts. (i) Of which concept (or convention) is this an example? Explain your answer. (ii) What is the purpose of creating a provision for bad debts?...
-
White Way Inc. produces and sells theater set designs and costumes. The company began operations on January 1, 2012. The following transactions relate to securities acquired by White Way Inc., which...
-
(d) The company had acquired Property, Plant 8: Equipment costing $40,000 on January 1, 2018. Suppose that the depreciation on this Equipment was calculated to be $2,000 for 2018. (2 points) Debit...
-
A certain newspaper provides the net asset value, the year-to-date percent return, and the three-year percent return for 882 mutual funds at the end of 2017. Assume that a simple random sample of 12...
-
If the required rate of return on Taiwan Semiconductor Manufacturing Company Limited (NYSE:TSM) stock is 6.6% and the growth rate of the recent USD 2.85 annual dividend is expected to be 3.5%/year....
-
CLO3 (Total 25 Marks) The standard cost card for a product is shown belowfor the period ended July 2019: Direct materials Direct labour 6 kilos @ $3.25 per kilo 2.5 hours @ $11.50 per hour Monthly...
-
Prove algebraically whether the function f (x) = -2x7+6x5 +5 is even, odd or neither. Remember to include a concluding statement. (3 Marks K/U)
-
Abby Ltd is a manufacturing company located in Nilai, Negeri Sembilan. The records of Abby Limited include the following balances as at 1 January 2023: Cost Accumulated Depreciation / / Depreciation...
-
Write the governing equation for energy balance in a heat generating wall. The wall is 50mm thick and the wall material is wood. Both ends of the wall are kept at 25. The volumetric heat generation...
-
List the steps of acoustic emission testing? And what are the safety precautions necessary for conducting the test?
-
The birds engaged in the communication exchange with greater than 90% accuracy for an extended period of time. True False 1 pts
-
Identify the Critical Infrastructure Physical Protection System Plan.
-
Suppose V = 0 and A = A0 sin(kx wt) y, where A0, w, and k are constants. Find E and B, and check that they satisfy Maxwell's equations in vacuum. What condition must you impose on w and k?
-
Show that the (ordinary) acceleration of a particle of mass m and charge q, moving at velocity u under the influence of electromagnetic fields E and B, is given by m 1-u/c[E+ux B- 1 u(u-E)]. -
-
Find the radiation resistance (Prob. 11.3) for the oscillating magnetic dipole in Fig. 11.8. Express your answer in terms of and b, and compare the radiation resistance of the electric dipole.
-
Compare and contrast direct and indirect real estate investments.
-
Explain what is meant by the term collectible, and give some examples of collectible items you or your family may own.
-
Describe precious metal and gem investments and why they remain popular despite their speculative nature.
Study smarter with the SolutionInn App