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...
-
The following table gives a number of yield strength values (in MPa) that were measured on the same aluminum alloy. Compute average and standard deviation yield strength values? 274.3...
-
Beer and pizza are complements because they are often enjoyed together. When the price of beer rises, what happens to the supply, demand, quantity supplied, quantity demanded, and the price in the...
-
What is a lineage, and how does it relate to a descent group?
-
Austin Limited is trying to determine the value of its ending inventory as of February 28, 2014, the companys year-end. The following transactions occurred, and the accountant asked your help in...
-
It seems that bio-technology or new medical options are radically reconfiguring our ideas about when "life" begins or ends - the expansions of the concept of life and death in formerly unknown...
-
Gibson Agency Case: 1. Calculate and present the budgeted profit for each of Gibson's clients for each of the years 2016 through 2019, using the current costing system (i.e., the one described in the...
-
(9) In S, two evends oceeure of the origin aud a distance X the along etaweoutly at tzo. The time nterval between the events in s' is (x+T), determine the 1S rebtwe v the brames in velozity terms X...
-
How can you keep your customers engaged with your social media sites?
-
What do you think are three common mistakes that novice analysts make in navigation design?
-
What do you think are three common mistakes that novice analysts make in input design?
-
What do you think are three common mistakes that novice analysts make in output design?
-
Under what circumstances would you use an image map versus a simple list menu?
-
A spacecraft moves along a path described by the parametric equations shown below for the first 200 s after launch. Here, x and y are measured in meters, and t is measured in seconds. Find the...
-
Imagine you are the HR manager at a company, and a female employee came to you upset because she felt a male coworker was creating a hostile work environment by repeatedly asking her out on dates...
-
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...
-
List each of the six branches of AI and briefly explain each one.
-
What are the three components of an Expert System (ES) program? Explain what each component does.
-
When training a machine learning application, developers can use one of three different approaches: supervised learning, unsupervised learning, and reinforcement learning. Describe each strategy and...
Study smarter with the SolutionInn App