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
bearhunter [10]
3 years ago
4

This program will output a right triangle based on user-specified height triangleHeight and symbol triangleChar.

Computers and Technology
1 answer:
olga_2 [115]3 years ago
6 0

Answer:

The above program is not correct, the correct program in c++ langauge is as follows:

#include <iostream>//header file.

using namespace std; //package name.

int main() //main function.

{

  char char_input;//variable to take charater.

  int size,i,j;//variable to take size.

  cout<<"Enter the size and charter to print the traingle: ";//user message.

  cin>>size>>char_input; //take input from the user.

  for(i=0;i<size;i++)//first for loop.

  {

     for(j=0;j<=i;j++)//second for loop to print the series.

       cout<<char_input<<" ";//print the charater.

     cout<<"\n";//change the line.

  }

  return 0; //returned statement.

}

Output:

  • If the user inputs 5 for the size and '%' for the charater, then it will prints the above series example.

Explanation:

  • The above program is written in C++ language, in which there are two for loop which prints the series.
  • The first for loop runs n time, where n is the size given by the user.
  • The second loop is run for every iteration value of the first for loop.
  • For example, if the first for loop runs for the 2 times, then the second for loop runs 1 time for the first iteration of the first loop and 2 times for the second iteration of the first loop.
You might be interested in
What is the computer’s natural language?
kirill [66]

Answer:

binary computer natural language

4 0
3 years ago
The first field of an Internet Control Message Protocol (ICMP) packet specifies the message type. Which choices represent messag
Scorpion4ik [409]

Answer: destination unreachable

time exceeded

Explanation:

You didn't give the options to the question but based on a similar question there I got online, the answer will be destination unreachable and time exceeded.

The Internet Control Message Protocol (ICMP) refers to a protocol that is used in the communication of problems with regards to the transmission of data. Based on the information given, the choices that represent message type examples are:

• destination unreachable

• time exceeded

4 0
3 years ago
Class secretType { public: static int count; static int z; secretType(); secretType(int a); void print(); static void incrementY
ANEK [815]

Answer:

a. secretType mySecret(9)

Explanation:

6 0
3 years ago
What is the meaning of Ram?​
masya89 [10]

Answer:

Random-Access Memory

Explanation:

used as a short-term memory for computers to place its data for easy access

5 0
2 years ago
How does an operating system manage peripheral devices?
azamat

Answer:

Device management controls peripheral devices by sending them commands in their proprietary machine language. The software routine that deals with each device is called a "driver," and the OS requires drivers for each of the peripherals attached to the computer.

Explanation:

4 0
3 years ago
Other questions:
  • Which term represents a computational instruction stored in computer memory?
    13·2 answers
  • What does NVRAM stand for
    8·2 answers
  • In Google search results, how are organic links different from sponsored links?
    13·2 answers
  • Right click on a spot of your desktop that is not covered by an icon, window, or menu. when the menu comes up, play with the opt
    7·1 answer
  • If an Administrator performs a clean install of Windows Server 2012 R2 on a new server, and then moves critical domain services
    9·1 answer
  • Which is a correct way to test whether two variables representing numbers, numOne and numTwo, are equal?
    8·1 answer
  • Why is fluency in information technology becoming increasingly important for many college majors?
    6·1 answer
  • What frequency band or bands do 802.11g, 802.11a, 802.11n, and 802.11ac use?
    13·1 answer
  • Members of the sales team use laptops to connect to the company network. While traveling, they connect their laptops to the inte
    15·1 answer
  • What do you think that private information like passwords, PIN numbers, will be guarded or shared with the public? Why?​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!