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
List the steps that you need to locate Microsoft Word on your computer
Olegator [25]
1.click windows start button on the bottom left corner
2. search Microsoft word
3.once Microsoft word is found right click on it
4. then you will see an option called "open file location"
5. then you will have the location of microsoft word
6 0
3 years ago
Typically, a programmer develops a programâs logic, writes the code, and ____ the program, receiving a list of syntax errors.
miv72 [106K]
"debugs" is the answer
4 0
3 years ago
A well-diversified portfolio needs about 20-25 stocks from different categories is this True or False?
borishaifa [10]

Usually they hold 15-20 as the minimum of the portfolios

So I would say True

3 0
3 years ago
Read 2 more answers
I am doing keyboarding keyboarding is very boring and yeah
Bingel [31]

Answer:

yes I agree with you

Explanation:

I have been keyboarding for the past 7 hours.

7 0
3 years ago
Read 2 more answers
Which term describes the distinct number of colors a graphic contains? (1 point)?
laila [671]
Your answer would be "Hue".
4 0
3 years ago
Other questions:
  • To join two or more objects to make a larger whole is to _____________ them.
    8·2 answers
  • You are the system administrator for a medium-sized Active Directory domain. Currently, the environment supports many different
    7·1 answer
  • The __________ is a visual or textual storyboard that will assist in determining the type of web pages on your site.
    14·1 answer
  • What would be a good hash code for a vehicle identification that is a string of numbers and letters of the form “9x9xx99x9xx9999
    9·1 answer
  • What are the correct answers?
    11·1 answer
  • Which of these is an expansion slot type?
    5·1 answer
  • Array testGrades contains NUM_VALS test scores. Write a for loop that sets sumExtra to the total extra credit received. Full cre
    11·1 answer
  • Create a file named homework_instructions.txt using VI editor and type in it all the submission instructions from page1 of this
    7·1 answer
  • Please help it’s timed
    5·1 answer
  • The act of using computer equipment to “break into” the computer systems of others?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!