C++ How To Program Plus Mylab Programming With Pearson Etext -- Access Card Package (10th Edition)
bartleby

Concept explainers

bartleby

Videos

Question
Book Icon
Chapter 21, Problem 21.23E
Program Plan Intro

Creating a String Pattern

Program Plan:

  • Include the required header files.
  • Define the “main” function.
    • Create integer variables and assign as required.
    • Create string variables strand assign the string to it.
    • Assign the half length of str to rows.
    • Create an outer loop to iterate from 1 to rows.
      • Create an inner loop to iterate from 1 to rows-1.
        • Display two spaces.
      • Create a loop to iterate up to k<2*i-1.
        • Check if count<= 2*i-1, if so, display str[count-1]with a space. Increase count by 1 and assign count1 tocount-2.
        • If not, then display str[count1-1] with a space. Decrease count1by 1.
        • Increase k by 1.
      • Reassign count1 and k to 0.
      • Add a line break to output console.
    • End of outer loop.

Blurred answer
Students have asked these similar questions
What is the main difference between Static routing and Dynamic routing (OSPF)? in terms of either wildcard mask or subnet mask, or especially for increasing the number of networks, explaining the reason while providing a specific example like what command they use in CLI
Add a new class Checking Account that inherits from the BankAccount class, and has a double instance variable overdraftLimit in addition to the variables inherited from the superclass. Create a constructor for the Checking Account class that takes in the account number, account holder name, initial balance, account type and overdraft limit as input, and uses the super keyword to call the constructor of the superclass, passing in the account number, account holder name and initial balance, account type. Re-write the withdraw() method in the CheckingAccount class so that it first checks if the withdrawal amount is less than the current balance plus the overdraft limit. If it is, the withdrawal is allowed and the balance is updated. If not, the method should return an error message "Insufficient funds". Create a new method displayOverdraft Limit() that returns the overdraft limit of the Checking Account. In the BankAccountTest class, create a new object of type Checking Account with…
Need help answering this pseudocode row question
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Literals in Java Programming; Author: Sudhakar Atchala;https://www.youtube.com/watch?v=PuEU4S4B7JQ;License: Standard YouTube License, CC-BY
Type of literals in Python | Python Tutorial -6; Author: Lovejot Bhardwaj;https://www.youtube.com/watch?v=bwer3E9hj8Q;License: Standard Youtube License