Question

Programming in C: Using a nested for loop create the pattern below. Prompt the user for...

Programming in C: Using a nested for loop create the pattern below. Prompt the user for the height (number of rows) and width (number of characters per line) for pattern A. You may use any number for height and width, just as long as the basic pattern is preserved. Call a function to print the pattern. This function receives the height and width as inputs (parameters) but does not return a value. Make use of an if structure to instruct the program what to print on the various lines and columns.
Pattern A:
=========
* *
* *
* *
* *
* *
* *
=========
0 0
Add a comment Improve this question Transcribed image text
Answer #1

# include <matt-. . h> include 〈conio, h > int height, uoidtt choice, int sow, column pri ntf(En Er height and ผ่dt ). forSampple Oututs- Enter helath and aid 必 *そ-

Add a comment
Know the answer?
Add Answer to:
Programming in C: Using a nested for loop create the pattern below. Prompt the user for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Step 2: Create the method specified below. static int GetValidWidth(string prompt) Input parameters prompt: message for...

    Step 2: Create the method specified below. static int GetValidWidth(string prompt) Input parameters prompt: message for user describing the input required Returns A non-zero width entered by the user Step 3: Create the method specified below. static int GetValidHeight(string prompt) Input parameters prompt: message for user describing the input required Returns A non-zero positive height entered by the user Step 4: Create the method specified below. static void DisplayBox(int width, int height, char fillChar) Input parameters width: width of each...

  • please write c programming for this code below. Write a program to print a pattern of...

    please write c programming for this code below. Write a program to print a pattern of numbers separated by spaces for the given number of rows. At the time of execution, the program should print the message on the console as: Enter number of rows For example, if the user gives the input as: Enter number of rows : 4 then the program should print the result as: 232 34543 4567654

  • Using Python programming, create a 2-by-3 list, then use a nested loop to: 1) Set each...

    Using Python programming, create a 2-by-3 list, then use a nested loop to: 1) Set each element's value to an integer indicating the order in which it was processed by the nested loop (1, 2, 3, 4, 5, 6). 2) Display the elements in tabular format. Use the column indices as headings across the top, and the row indices to the left of each row.

  • 7) Use MATLAB to create a pattern such as the one below in the command window....

    7) Use MATLAB to create a pattern such as the one below in the command window. Prompt the user to enter the max number of columns and number of intervals ran. In the left figure, the user selected 10 max columns and one interval. In the right figure, the user selected 5 max columns and two intervals. The program should run for n max columns and n number of intervals. ******* ** **** *** ***** ******* ***** ***

  • I need help with this python programming exercise, please! thanks in advance Create a Python script...

    I need help with this python programming exercise, please! thanks in advance Create a Python script file called hw4.py. Add your name at the top as a comment, along with the class name and date. Both exercises should be in this file, with a comment before each of them to mark it. Ex. 1. Write a program that inputs an integer number from the user, then prints a letter "O" in ASCII art using a width of 5 and the...

  • In C programming language have a program request the user to enter an uppercase letter. Use...

    In C programming language have a program request the user to enter an uppercase letter. Use nested loops to produce a pyramid pattern like this: The pattern should extend to the character entered. For example, the preceding pattern would result from an input value of E. Hint: Use an outer loop to handle the rows. Use three inner loops in a row, one to handle the spaces, one for printing letters in ascending order, and one for printing letters in...

  • create a new Java application called "RecursiveTriangle" (without the quotation marks) according to the following guidelines....

    create a new Java application called "RecursiveTriangle" (without the quotation marks) according to the following guidelines. Modify the example in Horstmann Section 5.9, pp. 228-230 so that the triangle displays “in reverse order” as in the example below, which allows the user to set the number of lines to print and the String used for printing the triangle. Use a method to prompt the user for the number of lines (between 1 and 10) to print. This method should take...

  • C++ TrainStation Program Create a function called searchForSchedules that will: - prompt a user to enter...

    C++ TrainStation Program Create a function called searchForSchedules that will: - prompt a user to enter a scheduleId - search for arrival and departure times of trains based on a trains ID number Create a function called editSchedules that will: - allow the user to edit the fields for a given schedule that is in the linked list. - the program must prompt the user to enter the scheduleId as the key to find the schedule to edit. Print a...

  • How do I solve using Matlab? Use MATLAB to create a pattern such as the one...

    How do I solve using Matlab? Use MATLAB to create a pattern such as the one below in the command window. Prompt the user to enter the max number of columns and number of intervals ran. In the left figure, the user selected 10 max columns and one interval. In the right figure, the user selected 5 max columns and two intervals. The program should run for n max columns and n number of intervals. **** ***** ***** *****

  • Answer using programming in C only. 6 pts Use a while loop to complete the following:...

    Answer using programming in C only. 6 pts Use a while loop to complete the following: Prompt the user to enter integers one by one, until the user enters a negative number to stop Calculate the sum and the average of all the numbers entered by the user Print the sum and the average onto the screen after the loop. Declare and initialize all variables. Be sure to keep a count of the numbers entered for the average calculation

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT