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
PolarNik [594]
3 years ago
8

Write a function with this prototype:

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

Answer:

Following are the code to this question:

#include <iostream> //defining header file  

using namespace std;

void numbers(ostream &outs, const string& prefix, unsigned int levels); // method declaration

void numbers(ostream &outs, const string& prefix, unsigned int levels) //defining method number

{

string s; //defining string variable

if(levels == 0) //defining condition statement that check levels value is equal to 0

{

outs << prefix << endl;  //use value

}

else //define else part

{

for(char c = '1'; c <= '9'; c++) //define loop that calls numbers method

{

s = prefix + c + '.'; // holding value in s variable  

numbers(outs, s, levels-1); //call method numbers

}

}

}

int main() //defining main method

{

numbers(cout, "THERBLIG", 2); //call method numbers method that accepts value

return 0;

}

Output:

please find the attachment.

Explanation:

Program description:

  • In the given program, a method number is declared, that accepts three arguments in its parameter that are "outs, prefix, levels", and all the variable uses the address operator to hold its value.
  • Inside the method a conditional statement is used in which string variable s and a conditional statement is used, in if the block it checks level variable value is equal to 0. if it is false it will go to else block that uses the loop to call method.
  • In the main method we call the number method and pass the value in its parameter.  

You might be interested in
What aspect of web design is Gloria following when she uses the same color
tresset_1 [31]
The answer to this is C
4 0
3 years ago
Read 2 more answers
A combined counting and logical looping statement may be needed in the following situations: (a). The values stored in a linked
sergejj [24]

Answer:

a i think

Explanation:

5 0
2 years ago
How are computers classified into different types? Explain ​
zloy xaker [14]

Answer:

On the basis of size there are four types of computer. They are minicomputer, micro computer, mainframe computer and super computer. Super computer is the fastest, most expensive, big in size, and most powerful computer that can perform multiple tasks within no second.

3 0
2 years ago
You have decided to use relative links for your Website's local pages instead of specifying absolute URLs. Your supervisor has a
marin [14]

Answer:

C. The site can be moved from one server to another with minimal disruption.

Explanation:

The perfect reason is the option C.The site can be moved from one server to another with minimal disruption. with relative links you don't need to change the host name for the local page because the browser assumes the address that is in the browser and creates a path relative to it as specified by the file.

4 0
3 years ago
__________ acts as a central connecting device for wireless devices and allows laptops, PDAs, and handheld computers to communic
andrey2020 [161]

Wireless Access Point (WAP) acts as the central connecting device for the wireless network and allows laptops, PDAs and handheld computers to communicate with each other.

7 0
3 years ago
Other questions:
  • 1. A(n) ____ is a special type of inline image in which you define one or more areas as hotspots. *
    14·1 answer
  • Object-oriented development could potentially reduce the time and cost of writing software because: Group of answer choices a) i
    5·1 answer
  • How to change default search engine in internet explorer 11?
    13·1 answer
  • Individuals and businesses have concerns about data security while using Internet-based applications. Which security risk refers
    13·1 answer
  • CJ is developing a new website blogging about cutting-edge technologies for people with special needs. He wants to make the site
    8·1 answer
  • The popularity of blogging is an example of _____. the public producing the media the public regulating the media both of the ab
    15·2 answers
  • A USB flash drive uses solid
    7·1 answer
  • to minimize wrist injury switch frequently among touch gestures the keyboard and the mouse true or false
    15·1 answer
  • Which characteristic of a relational database distinguishes it from a flat file?
    5·1 answer
  • Sonja is writing a program to compare two numbers and print the larger number. Which of these should be used?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!