Write a program that displays a pattern as shown below, according to the input size, which...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that displays a pattern as shown below, according to the input size, which determines the number of rows and columns in the pattern. Determine the odd or even version of this question using the 6th digit of your student ID number. If the input integer is 0, negative or an even number, then your program should print nothing. Odd Version (odd 6 digit in student ID) Even Version (even 6 digit in student ID) Sample display More examples Input 5 3 1 Sample display 7 Output (Odd Version) Output (Even Version) IMPORTANT NOTE: You need to follow the spacing as shown in the sample display. There should be NO space between adjacent asterisks and no additional blank lines in the output. There is also NO prompt message for the input size. DO NOT add extra text in the output which will be considered as incorrect in marking. Write a program that displays a pattern as shown below, according to the input size, which determines the number of rows and columns in the pattern. Determine the odd or even version of this question using the 6th digit of your student ID number. If the input integer is 0, negative or an even number, then your program should print nothing. Odd Version (odd 6 digit in student ID) Even Version (even 6 digit in student ID) Sample display More examples Input 5 3 1 Sample display 7 Output (Odd Version) Output (Even Version) IMPORTANT NOTE: You need to follow the spacing as shown in the sample display. There should be NO space between adjacent asterisks and no additional blank lines in the output. There is also NO prompt message for the input size. DO NOT add extra text in the output which will be considered as incorrect in marking.
Expert Answer:
Answer rating: 100% (QA)
C program to display the odd version of the pattern include using namespace std int main declare var... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
What are the benefits of implementing Inclusive Education in all schools in the country to the Filipino Children?
-
Make a simple SWOT Analysis of the Australian app 'Eat Club'
-
In this project, we will write a program that controls a quiz show, much like the many popular TV shows. The program will read in a group of questions and their multiple choice answers, storing them...
-
Prerequisite: You will be using "utils.py" from Python 2 Assignment Task 1) In "utils.py," add a Python function called "calculate_fourier_coefficients" that calculates the coefficients of a Fourier...
-
1. Lynn is shocked by the action taken by HR and does not feel the violation of company policy warranted the punitive action that was taken. In the long-term, what actions does the company need to...
-
The statement of cash flows for Riker Company (prepared using the indirect method) follows. Consider the following additional information: (a) Sales for the year totaled $812,350. Cost of goods sold...
-
What formula should Hardy Company use to calculate the total amount of interest on a note payable that uses add-on interest?
-
Vivian Books buys books and magazines directly from publishers and distributes them to grocery stores. The wholesaler expects to purchase the following inventory. Vivian Books accountant prepared the...
-
Ensuring information needs of evaluation users are satisfied summarizes which of the standards of evaluation from CDC's Framework for Program Evaluation? Question 8 options: Utility Feasibility...
-
Include a reflection to the client that discusses the tax recommendations and consequences of your newly chosen energy-friendly initiative. Specifically, you must address the following: Identify the...
-
Instruction: Complete ALL questions. Question 1 At Middlesex Family Medical Centre, families are our business. This Centre is the only medical specialty that provides comprehensive medical care in...
-
A three year dual currency bond that pays annual coupons of 50 NZD and a principal value of 1000 AUD at maturity has a present value of NZD 1250. The one, two and three year yield to maturity on...
-
Given data below answer the question. E5-7 (Algo) Estimating Cost Behavior Using High-Low Method [LO 5-3] Canyon Dental Services is a specialized dental practice whose only service is filling...
-
ABC Manufacturing Company has recently opened a plant in Bermuda in order to take advantage of certain tax benefits. In order to quality for these tax benefits, the company s direct manufacturing...
-
A middle age couple has made an agreement with Landscape Forever Company, a gravesite landscaping and maintenance firm. The agreement states that the company will provide deluxe maintenance for the...
-
Imagine your entire team, including high, average, and low performers. Picture yourself on a life raft, and your teams are in a sea of uncertainty. 1. Decide who you'd rescue first and why? 2. Who...
-
Record the reclassification of the property tax revenue of current year: Revenues Deferred Inflows of Resources-Unavailable Revenues Below is the data to be used 17. All unpaid current year's...
-
Sheldon and Leonard had a million-dollar idea. In order to make it happen, they have to do special research first. Only Kripke can help them in this matter. But Kripke is known to be the first-class...
-
Calculate the amount of the child and dependent care credit allowed for 2012 in each of the following cases, assuming the taxpayers had no income other than the stated amounts. a. William and Carla...
-
On July 1, 2012, Ted, age 73 and single, sells his personal residence of the last 30 years for $365,000. Ted's basis in his residence is $35,000. The expenses associated with the sale of his home...
-
Clarita is a single taxpayer with two dependent children, ages 10 and 12. Clarita pays $3,000 in qualified child care expenses during the year. If her adjusted gross income (all from wages) for the...
-
Why can we say that the sale of a manufactured product is recorded at two different amounts?
-
Lyle Manufacturing Company applies manufacturing overhead at the rate of 150% of direct labor cost. During October 2019, Lyle incurred \($82,000\) of direct labor costs and \($120,000\) of...
-
Contrast service departments with production departments. Give three examples of a service department.
Study smarter with the SolutionInn App