Write a program that prints the following diamond shape. Your printf statements may print either one...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that prints the following diamond shape. Your printf statements may print either one asterisk (*) or one blank. Read an odd number in the range 1 to 19 to specify the number of rows in the diamond. Your program should then display a diamond of the appropriate size. Use nested for statements. please enter number of rows (odd nummber): 4 please enter number of rows (odd nummber): 7 Rubric 1.3 Criteria Detailed comment to explain every step of the solution Self explanatory variable names and good coding format (empty lines, indentation ect) Check use input is odd number, if not ask use to re-enter Use nested for statement Print out the diamond pattern as exptected program should include copywrite which contains the assignment number and your name 2 pts Full Marks 2 pts Full Marks 4 pts Full 5 pts Full Marks 5 pts Full Marks 2 pts Full Marks 2 pts Partial Ratings 0 pts No Marks 0 pts No Marks 0 pts No Marks 0 pts No Marks print out some patten with empty space and stars, but not the correct patten 0 pts No Marks 0 pts No Marks Pts 2 pts 2 pts 4 pts 5 pts 5 pts 2 pts Total Points: 20 Write a program that prints the following diamond shape. Your printf statements may print either one asterisk (*) or one blank. Read an odd number in the range 1 to 19 to specify the number of rows in the diamond. Your program should then display a diamond of the appropriate size. Use nested for statements. please enter number of rows (odd nummber): 4 please enter number of rows (odd nummber): 7 Rubric 1.3 Criteria Detailed comment to explain every step of the solution Self explanatory variable names and good coding format (empty lines, indentation ect) Check use input is odd number, if not ask use to re-enter Use nested for statement Print out the diamond pattern as exptected program should include copywrite which contains the assignment number and your name 2 pts Full Marks 2 pts Full Marks 4 pts Full 5 pts Full Marks 5 pts Full Marks 2 pts Full Marks 2 pts Partial Ratings 0 pts No Marks 0 pts No Marks 0 pts No Marks 0 pts No Marks print out some patten with empty space and stars, but not the correct patten 0 pts No Marks 0 pts No Marks Pts 2 pts 2 pts 4 pts 5 pts 5 pts 2 pts Total Points: 20
Expert Answer:
Related Book For
Java How To Program Late Objects Version
ISBN: 9780136123712
8th Edition
Authors: Paul Deitel, Deitel & Associates
Posted Date:
Students also viewed these algorithms questions
-
5. Answer all parts of this question. Each part is an independent question. i) Consider a Cobb-Douglas production function ii) Q=al K Write an expression for the natural log of the output. By log...
-
Modify the application you wrote in Exercise 4.24 to read an odd number in the range 1 to 19 to specify the number of rows in the diamond. Your program should then display a diamond of the...
-
You have been directed to determine the value of Ebay's stock which is currently trading at $33.8. Ebay paid a dividend of $1.25 in the most recent year (Do). In addition, the risk free rate is 14%...
-
What are some of the hallmarks of each type of equity mode?
-
Consider the supply chain involved when a customer purchases a book at a bookstore. Identify cycles in this supply chain and the location of the push/pull boundary.
-
Most living organisms reproduce sexually sometimes or have some other mechanism for exchanging genetic material. What is the advantage of sexual reproduction or genetic exchange?
-
Refer to the preceding facts for Pontiacs acquisition of 80% of Starks common stock and the bond transactions. Pontiac uses the simple equity method to account for its investment in Stark. On January...
-
9.3 Find the difference quotient for f(x) = 2x - 3. Here are the steps. Compute: (a) f(x+h)= (b) f(x + h)-f(x) = (c) f(x+h)-f(x) h
-
You work for Euroc, a limited liability company, which seeks growth through acquisitions. You are a member of a team that is investigating the possible purchase of Choggerell, a limited liability...
-
A polythene rod of length 0.5 m floats upright in a water tank. (i) Given that the densities of polythene rod and water are 920 and 1000 kg/m3 respectively, what is the length of the rod immersed in...
-
On July 1, 2020, Jen and King agreed to form a partnership from their respective proprietorship businesses and to share profits equally. Jen and King's balance sheet before the formation were: Jen...
-
Should instance variable interestRate be declared as static? Explain. 2. Write the output from the test harness for class SavingsAccount. EXERCISE 2 3. Which method(s) of the class CheckingAccount...
-
Use the dataset NYSE.DTA for this exercise. The data comes from the New York Stock Exchange and contains daily closing price and total volume of trades from January 2005 to December 2010. The New...
-
The following 3 assets are available to an investor: (1) Asset A: Er=0.12, A = 0.30 (2) Asset V: Ery = 0.24 oy = .60 2 (3) Asset R: ETR = 0.20 R = .40 Also: ry=0.04. PAV = 0.20, PAR = 4, PVR = 0.1...
-
make w hole call price in $ Capital to be raised: $80,000,000 Number of years to maturity: 30 Call the bonds in how many years: 7 Coupon bond: YTM (Yield To Maturity): 7.00% Annual coupon rate: 7.00%...
-
Evaluate f dx is equal to vx?-16 A. In- vx? 16| + C C. Arcsin (-) + 4 In|x + Vx2 16| + C x2-16 . ++C D. In|x + Vx2 - 16| + C 4
-
With your classmates, form small teams of skunkworks. Your task is to identify an innovation that you think would benefit your school, college, or university, and to outline an action plan for...
-
Write a generic class Pair which has two type parametersF and Seach representing the type of the first and second element of the pair, respectively. Add get and set methods for the first and second...
-
Most people have worked a crossword puzzle, but few have ever attempted to generate one. Generating a crossword puzzle is suggested here as a stringmanipulation project requiring substantial...
-
Spam (or junk e-mail) costs U.S. organizations billions of dollars a year in spam-prevention software, equipment, network resources, bandwidth, and lost productivity. Research online some of the most...
-
Over what ranges of taxable income in 2017 will the total income tax liability for two persons with equal incomes who file as single individuals equal their income tax liability if they file jointly...
-
If a taxpayer has $40,000 of employee salary in 2017, how much will be withheld for the Social Security and Medicare taxes?
-
Sally and Jim are married and have taxable income in 2017 of $160,000. If they could file their income tax as single individuals, each of them would have taxable income of $80,000. Do they have a...
Study smarter with the SolutionInn App