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
gtnhenbr [62]
3 years ago
13

How would you print from 1 to 1000

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

Answer:

There are two ways to print 1 to 1000

  1. Using Loops.
  2. Using Recursion.

Explanation:

Using loops

for(int i=1;i<=1000;i++)

{

  cout<<i<<" ";

}

Using recursion

Remember you can implement recursion using a function only.

void print(int n)

{

  if(n==0)

  return;

  print(n-1);

  cout<<n<<" "';

}

you should pass 1000 as an argument to the function print.

You might be interested in
When do we use an if- statement ​
wel

Answer:

You'd use an if statement if something happens. What I mean is that {If this happens} Then that happens but if the if doesnt happen then the then doesnt happen

Explanation:

3 0
3 years ago
Read 2 more answers
Which can be inserted using the insert panel in dreamweaver cc?
timofeeve [1]

Answer: Learn how to use the Insert panel in Dreamweaver to create and insert objects, such as tables, images, OAM files, and Bootstrap components. The Insert panel contains buttons for creating and inserting objects such as tables and images. The buttons are organized into categories.

3 0
3 years ago
4. Explain the term prejudice. What is an example of prejudice as it relates to parenting?
lara [203]
An unfavorable opinion or feeling formed beforehand or without knowledge, thought, or reason.
2.
any preconceived opinion or feeling, either favorable or unfavorable.
3.
unreasonable feelings, opinions, or attitudes, especially of a hostile nature, regarding an ethnic, racial, social, or religious group.
4.
such attitudes considered collectively:
The war against prejudice is never-ending.
5.
damage or injury; detriment:
a law that operated to the prejudice of the majority.
7 0
3 years ago
Declare a structure whose tag name is Server and that contains the following fields: manufacturer, a string, model and serialnum
NemiM [27]

Answer:

The answer to this question as follows :

Structure definition:

struct Server  //define structure server.

{

string manufacturer;

 //define string variable.

string model, serialnum;  //define string variable.

int year;

 //define integer variable.

double clockSpeed;

 //define double variable.

int cores;   //define integer variable.

int ram;

    //define integer variable.

int storage;

  //define integer variable.

};

Explanation:

Structure is a collection of heterogeneous(different type) elements. It is a user-define datatype which is available on the C/C++ programming language. To define any structure we use the struct keyword. The syntax of defining structure can be given as:

Syntax:

struct structure name

{

//define variables

//statements and code.

};

OR

struct structure name

{

//define variables

//statements and code.

}create structure variable;  

In the above structure code, we define a structure that is "Server". In this structure, we define different types of variables that is " manufacturer, model, serialnum, year, clockSpeed, cores, ram, and storage". In this structure variable manufacturer, model and serialnum datatype are a string and clockSpeed datatype is double and variable year, cores, ram, and storage data type is an integer.

3 0
2 years ago
Which of the following is not hardware?
Pachacha [2.7K]

Answer:

A

Explanation:

I think it would be A because i have never heard of a virus scanner

6 0
2 years ago
Other questions:
  • This question refers to a standard deck of playing cards. If you are unfamiliar with playing cards, there is an explanation in P
    10·2 answers
  • What is the maximum number of colors that should be used on a slide?
    5·2 answers
  • 1.) How do parks and other green spaces benefit a community?
    10·1 answer
  • In every organization, workers receive and sendinformation daily. The flow of this information should be____________.upward and
    11·1 answer
  • Which tool is used to view stars in galaxies far from the Milky Way?
    10·1 answer
  • 2:3:5<br>_ _ _<br>3 2 8<br><br><br><br>find ratio​
    5·1 answer
  • ......... mi2hej<br><br>ejid8eo19o1b2bxhxjxjdnneejk2929nr
    5·2 answers
  • Subcribe to me for brainly my YT is KeepUsweatin
    9·1 answer
  • What does an effect allow you to do in<br> EarSketch?
    15·1 answer
  • What is an example of work performed by an integration platform as a service (ipaas)?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!