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
What is the difference between a rack and a tower?
mash [69]

Answer:

A rack is a metal frame used to hold various hardware devices such as servers, hard disk drives, modems and other electronic equipment.

A tower is a metal chassis that holds all of the computer's components.

I hope this helped you !

3 0
3 years ago
In computer science, what is the name for a series of steps used to solve a problem?
liraira [26]

Answer:

Algorithm

Explanation:

It is the step by step procedure,which defines a set of instructions which is to be carried out by the computer

5 0
3 years ago
Which option can be used to access more settings than are available in the Backstage view?
Bumek [7]

Answer:

orientation settings

Explanation:

so u can now more about whta u doing

6 0
3 years ago
If an ______ is caught dumping hazardous materials, that person can be prosecuted. Answer choices A) Employee B) Employer C) Bot
Citrus2011 [14]

Answer:

Both A and B

Explanation:

I think it is right

hope this helps :)

5 0
2 years ago
The protocol that enables computers on the Internet to communicate with each other is called _____.
dybincka [34]
"C" is the correct answer, if its correct please mark me brainliest.
5 0
3 years ago
Other questions:
  • Your boss calls you from his home to use the vpn connection you configured for him on his laptop. he has traditionally depended
    6·1 answer
  • The method header of the equals() method within the string class is ____.
    13·1 answer
  • You are to create a program using Python that asks the user for a nonnegative number, then computes the mean and variance using
    15·1 answer
  • Describe what is meant by the following:
    14·1 answer
  • Write a function named firstLast2 that takes as input an array of integers and an integer that specifies how many entries are in
    14·1 answer
  • Produce definition in computer
    9·2 answers
  • Lab 6B: printing a binary number
    13·1 answer
  • How is science and technology used in the society​
    11·1 answer
  • What is wrong with the following code? publicstatic char grade(int score) { if (score &gt;= 9) { return 'A'; } else if (score &g
    6·1 answer
  • Colorful bead bracelet in codehs
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!