1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dolphi86 [110]
3 years ago
4

c++ This program will output a right triangle based on user specified height triangleHeight and symbol triangleChar. (1) The giv

en program outputs a fixed-height triangle using a * character. Modify the given program to output a right triangle that instead uses the user-specified triangleChar character. (1 pt) (2) Modify the program to use a nested loop to output a right triangle of height triangleHeight. The first line will have one user-specified character, such as % or *. Each subsequent line will have one additional user-specified character until the number in the triangle's base reaches triangleHeight. Output a space after each user-specified character, including after the line's last user-specified character. (2 pts) Example output for triangleChar = % and triangleHeight = 5:

Computers and Technology
1 answer:
malfutka [58]3 years ago
5 0

Answer:

see explaination

Explanation:

Program code:

//Include the needed header

#include <iostream>

using namespace std;

//Method main()

int main()

{

//Declare a variable for triangle character

char triangleCharacter;

//Declare a variable for triangle height

int triangleHeight;

//Prompt the user for traingle character

cout<<"Enter a character:";

//Read triangle character

cin>> triangleCharacter;

//Prompt the user for traingle height

cout<<"Enter traingle height:";

//Read triangle height

cin>> triangleHeight;

//Display first line

cout << triangleCharacter << " " << endl;

//Display second line

cout << triangleCharacter << " " << triangleCharacter << " " << endl;

//Display third line

cout << triangleCharacter << " " << triangleCharacter << " " << triangleCharacter << " " << endl;

//Return

return 0;

See attachment for program output

You might be interested in
A standardized specification of a motherboard (including its dimensions, supported power supply types, and layout of components)
Alik [6]
The correct answer is 'Form Factor'. The standardized specification of a motherboard ( including it's dimensions, supported power supply types, and layout of components) is know as the motherboard's form factor.
5 0
3 years ago
Write a report on the effectiveness of using thicker bags. Remember to include the effect on the environment and the economy in
malfutka [58]

The effectiveness of using thicker bags are:

  • It has the lowest environmental impact in terms of any other disposable bag.
  • It can be used three to six more times.
  • It is environmentally sustainable.

<h3>What is the effect of thicker plastic bags have on the environment?</h3>

The use of plastic bags is known to have some form of detrimental effects on the such as animal choking, pollution, and others.

Conclusively, Note that thicker bags needs a lot of plastic to be able to produce it and it goes to waste even if a person do not use it again.

Learn more about environment from

brainly.com/question/17413226

4 0
3 years ago
In cell g6, enter a formula that calculates the discount rate for the off-peak rental price per day. for example, using the peak
Tresset [83]

The peak rentals  per day values are 149.95  

the off peak rentals per day values are 120.


formula must start with = because it is in excel

3 0
4 years ago
What is the main difference between a shape and an icon?
otez555 [7]

Answer:

a.

Explanation:

you can size and position a shape but not an icon

7 0
2 years ago
When a program is being implemented, which step comes after executing
adoni [48]

Answer:

c) maintaining

Explanation:

A software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications. There are seven (7) main stages in the creation of a software and these are;

1. Planning.

2. Analysis.

3. Design.

4. Development (coding).

5. Testing.

6. Implementation and execution.

7. Maintenance.

Hence, when a program is being implemented, the step which comes after executing is maintaining. This is ultimately the last stage of the software development process and it involves regular updates and other management tasks.

8 0
3 years ago
Other questions:
  • James wishes to access a certain software service via different computing systems over the Internet. What technology provides so
    13·2 answers
  • What is the maximum number of charters of symbols that can be represented by UNicode?
    5·1 answer
  • Harry wants to change the background of all of his presentation slides. Which slide will enable him to make this change to all t
    14·1 answer
  • Given numRows and numColumns, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print
    7·1 answer
  • Describe security risks associated with downloading items online
    8·1 answer
  • What is the definition of a digital signal?
    14·1 answer
  • Discuss the importance of top management commitment and the development of standards for successful project management. Provide
    10·1 answer
  • W t f is a ground fault circuit interrupter?
    6·2 answers
  • "What router feature provides basic security by mapping internal private IP addresses to public external IP addresses, essential
    10·1 answer
  • In your own words, how are sources of income and expenses related to
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!