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
Question 1(Multiple Choice Worth 5 points)
vlabodo [156]

Answer:

Information assurance

Explanation:

Data theft can be defined as a cyber attack which typically involves an unauthorized access to a user's data with the sole intention to use for fraudulent purposes or illegal operations. There are several methods used by cyber criminals or hackers to obtain user data and these includes DDOS attack, SQL injection, man in the middle, phishing, etc.

Information assurance is a broad category that is typically used by cybersecurity or network experts to protect sensitive user information such as passwords, keys, emails, etc., in both digital and hard-copy forms

6 0
3 years ago
Where is NumPy used?
Svetradugi [14.3K]

Explanation:

The ndarray (NumPy Array) is a multidimensional array used to store values of same datatype. These arrays are indexed just like Sequences, starts with zero.

7 0
3 years ago
Read 2 more answers
Look at the following structure declaration.
myrzilka [38]

Answer:

B. a tag

Explanation:

In the structure definition given below:

struct Employee

{

string name;

int idNum;  

};

Employee corresponds to the tag of the structure. The tag is used to create additional instances of the structure. For example:

struct Employee e1;

struct Employee e2;

name and idNum are members of the Employee structure and are referenced using the dot notation. e.g.,

struct Employee e1;

e1.idNum=1;

7 0
3 years ago
How to insert header and page number in word 2016?
AleksAgata [21]
Insert - Header - choose header of your choice. Page numbers are below the Header icon

3 0
2 years ago
Any cute boy wants to talk with me?
andrew-mc [135]

Answer:

no

Explanation:

no

5 0
2 years ago
Read 2 more answers
Other questions:
  • Adam discovers a virus on his system that is using encryption to modify itself. the virus escapes detection by signature-based a
    14·1 answer
  • An email address is made up of all of the following parts except
    13·2 answers
  • What does that program print out?<br><br> a) 2<br> b) 3<br> c) 4<br> d) 8
    14·2 answers
  • While creating a sketch, what helps you identify positive and negative space?
    13·1 answer
  • After compiling source code, which command still needs to be run in order to copy the newly compiled binaries into a directory l
    5·1 answer
  • Why save html documents as lowercase.?
    9·1 answer
  • The Technology Librarian asks you to find out how many hops it takes to get to the first Wi-Fi kiosk. What Windows command can y
    5·1 answer
  • Different between internet and email​
    5·1 answer
  • You want to use the randrange() method. Which line will allow you to enter the following code in IDLE?
    12·2 answers
  • Leon needs to configure the days and times of his work week for his Outlook Calendar. Which option should he
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!