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
Which type of software-generated problems can indicate that a software bug is causing a memory error?
Katena32 [7]
The type of software-generated problems that can indicate that a software bug is causing a memory error are page fault, exception error and general-protection fault. Registry errors show that there are parts of the registry that were written to the faulty parts of the RAM. An erroneous memory count would happen when there is incompatibility in the installation.
3 0
3 years ago
5. A Disk defragmenter tool does what to a computer HDD?
Ivenika [448]

Answer:It rearranges the files on a hard drive to get quicker access to them.

5 0
3 years ago
Type the correct answer in the box. Spell all words correctly.
Tom [10]

Answer:

navigate keys

Explanation:

the up and down keys are to scroll through documents and pages.

8 0
3 years ago
Read 2 more answers
How can we work together to fix problems with our websites
Virty [35]
Add a Value Proposition. ...
Website Navigation. ...
Call to Action Text. ...
Call to Action Colors. ...
Try The 10-Foot Test. ...
Carousels. ...
Social Proof. ...
Testimonial Pages.
8 0
3 years ago
When designing a slide for presentation, it is best to include as much information as possible on every slide. True Or False
Mariulka [41]

Answer:

false

Explanation:

try to limit the amount of info on each slide

4 0
3 years ago
Read 2 more answers
Other questions:
  • In C, developers may access arrays via bracketed syntax like Java or by using * dereferencing notation. The following assignment
    5·1 answer
  • Write a C++ program that prompt the user to enter v in meter/second(m/s) and the acceleration in a in meters/second squared (m/s
    15·1 answer
  • Macro photographs are what type of photographs? A. Close-up B. Telephoto C. Abstract D. All of the above
    14·1 answer
  • What factors do network consultants consider when determining the network needs of a business? Use the space provided below to a
    6·1 answer
  • Is a free verse a poetry that has no images
    5·2 answers
  • Which of these statements correctly describe aspects of testing code? Check all of the boxes that apply.
    14·1 answer
  • We can improve our knowledge and skills on animals and fish raising with the use of internet​
    15·1 answer
  • A laptop can be kept on palm to work. [true/false) ​
    5·1 answer
  • A program with a graphical user inter-face for displaying HTML files, used to navigate the World Wide Web.
    8·1 answer
  • To find information on a network use a ____
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!