22) write a C++ program to generate the function of data type string to append PlusLine(m) to produce each line in the Ex: str= PlusLine(2) > will producs str.append(str2); str="++***" Hint: string St="; St-St+*; => S

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter14: Numerical Methods
Section: Chapter Questions
Problem 1PP
icon
Related questions
Question
I need the answer as soon as possible
function of data type string to append the outputs of two functions StarsLine(n), and
PlusLine(m) to produce each line in the pattern.
+****
++***
Ex: str= PlusLine(2) > will produce "++";
str.append(str2); str="++****
+++**
Q2) write a C++ program to generate the following pattern using the append predefined******
str2 StarLine(3)-> will produce "*****
+++++
Hint: string St=""; St-St+*: => St="**": St-St+*'; => St="**";
+++++
Transcribed Image Text:function of data type string to append the outputs of two functions StarsLine(n), and PlusLine(m) to produce each line in the pattern. +**** ++*** Ex: str= PlusLine(2) > will produce "++"; str.append(str2); str="++**** +++** Q2) write a C++ program to generate the following pattern using the append predefined****** str2 StarLine(3)-> will produce "***** +++++ Hint: string St=""; St-St+*: => St="**": St-St+*'; => St="**"; +++++
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Datatypes
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr