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
Digital subscriber lines: are very-high-speed data lines typically leased from long-distance telephone companies. are assigned t
V125BC [204]

Answer: Operate over existing telephone lines to carry voice, data, and video.

Explanation:

Digital subscriber line is a means of transferring high bandwidth data over a telephone line. Such data could be a voice call, graphics or video conferencing. DSL uses a user's existing land lines in a subscriber's home, allowing users to talk on a telephone line while also being connected to the Internet. In most cases, the DSL speed is a function of the distance between a user and a central station. The closer the station, the better its connectivity.

5 0
3 years ago
For window 7 explain the steps you will use to find the available program you will list.
Alex_Xolod [135]
Follow these steps.
1. Make sure that your pc is on.
2. Press your Window key - on your bottom left of your keyboard you will see a window key. 
3. After pressing it will show a tab on your bottom left of your monitor.
4. On that tab you will see an (All Programs) text.
5. Click it and it will show all programs available on your pc.
8 0
3 years ago
This how to start a brainly challenge besides the default one.
Butoxors [25]

Answer:

thanks for the knowledge! :D

3 0
3 years ago
Read 2 more answers
Analyze the following code. Is count &lt; 100 always true, always false, or sometimes true or sometimes false at Point A, Point
GaryK [48]

Answer:

Point A: Always True

Point B: Sometimes false

Point C: Always False

Explanation:

In the given code snippet. Point A is the first statement within the While loop the statement System.out.println("Welcome to Java!"); will only be executed if the while condition evaluates to true.

At Point B, The statement count++ increases the value of the counter at every iteration, while it will be true for most occasions, at the last increament, this statement will be false that is at count=100, The condition will be false at this point just before program execution breaks out of the loop

Point C is outside of the loop, this happens when the given condition is no longer true.

8 0
3 years ago
Universal Windows Platform is designed for which Windows 10 version?
Naddika [18.5K]

Universal Windows Platform is an open source API created by Microsoft and first introduced in Windows 10. The purpose of this platform is to help develop universal apps that run on Windows 10, Windows 10 Mobile, Xbox One and HoloLens without the need to be re-written for each. It supports Windows app development using C++, C#, VB.NET, and XAML. The API is implemented in C++, and supported in C++, VB.NET, C#, F# and JavaScript. Designed as an extension to the Windows Runtime platform first introduced in Windows Server 2012 and Windows 8, UWP allows developers to create apps that will potentially run on multiple types of devices.

6 0
3 years ago
Other questions:
  • How to delete audio from powerpoint​
    13·1 answer
  • What do u call a individual that loves motor bikes and leather and is in a rival group known as mods?
    5·1 answer
  • You need to immediately terminate process id 2129. which command should you use?
    15·1 answer
  • How important is technology in education? what technology-related skills can you contribute to a school district answers?
    13·1 answer
  • To create a new query in Design view, click CREATE on the ribbon to display the CREATE tab and then click the ____ button to cre
    9·1 answer
  • Baking Cookies. Sweet Dough Inc. bakes cookies—a popular dessert—based on the quantities ordered by their customers. Three raw m
    12·1 answer
  • A stateless firewall inspects each incoming packet to determine whether it belongs to a currently active connection.
    9·1 answer
  • How to use access?<br> like working in access and bringing tables and stuff
    5·1 answer
  • What do other people think of e.t ( be specifc by putting a line in the story)<br><br> E.T MOVIE
    11·1 answer
  • You defined a shoe data type and created an instance.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!