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
maria [59]
3 years ago
10

How would you print just the even numbers from 2 to 1000

Computers and Technology
1 answer:
Bingel [31]3 years ago
3 0

Here is code in C++ to print all the even numbers from 2 to 1000.

#include <bits/stdc++.h>

using namespace std;

//main function

int main() {

// loop which iterate from 2 to 1000 and print all the even numbers

cout<<"All the even numbers from 2 to 1000 are:"<<endl;

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

{

// checking for even number

  if(i%2==0)

   {

   // print the even number

   cout<<i<<" ";

   }

}

return 0;

}

Explanation:

First we declare a variable "i" of integer type to iterate a for loop from 2 to 1000(both inclusive).In the for loop it will check for every number,if remainder is equal to zero when it divided by 2 then number is even and That number will be printed. If the number is not even then it will check for the next number.When the it checks for i=1000,it will come out from the loop.

You might be interested in
A computer record is used to store all the information about one transaction, but several such records must be used to store the
never [62]

Answer:

True

Explanation:

A single file can be used to record/ store all the information regarding a transaction because in a transaction there are less complexities. a  simple transaction involves an exchange/communication between a buyer and a seller which involves exchange in finances between the buyer and the seller.  

An employee can be involved in several activities like work activities and multiple transactions while a single inventory part record is different from an employee's record and  any other form of transaction. hence separate files have to be created for each of these activities.

To have an easy access to this information when needed a master file is created to store all the individual files.

7 0
3 years ago
A slow response when opening applications or browsing the Internet, applications that do not work properly, an operating system
blagie [28]

Answer:

C. Symptoms of malware mutation

Explanation:

They are signs that could indicate that ones system is infected by virus.

Such signs includes:

1.Slow booting or startup.

2.Low space storage.

3.Blue screen of death.

4.Slow Internet performance.

5.Sending of spam messages.

6.Disabled security.

7.Browsing error.

8.Pop-up messages.

9.Renaming of files.

10.Loss of certain files, music, messages, etc.

3 0
3 years ago
Read 2 more answers
What are the data types in access​
Julli [10]

Answer:

Data type in Microsoft Access Database

Text  

Memo  

Byte  

Integer

Long  

Single  

Double  

Currency  

AutoNumber  

Date/Time  

Yes/No  

Ole Object  

Hyperlink  

Lookup Wizard

Explanation:

4 0
3 years ago
True or false mobile devices need to work within limited screen space
eduard
A phone may have a 4 inch screen and so it cant just extend to 5 inches. So it would he true
3 0
3 years ago
Read 2 more answers
________ are devices in a computer that are in either the on or off state
Vanyuwa [196]
The appropriate response is Electrical Switches. These are electromechanical gadgets that are utilized as a part of electrical circuits to control, recognize when frameworks are outside their working reaches, flag controllers of the whereabouts of machine individuals and work pieces, give a way to manual control of machine and process capacities, control lighting, et cetera.
6 0
3 years ago
Other questions:
  • The most efficient way to perform data entry is to keep your hands on the keyboard and press _______ to move to the next cell in
    14·1 answer
  • What is data anayltics
    5·1 answer
  • Robin ensures that she is always available if anyone in the team needs her. Which quality is shown by robin?
    9·2 answers
  • To maintain her audience's confidence in her, what should kiara not do while delivering her presentation?
    10·1 answer
  • You are configuring two PCs for your network, PC-A is given an IP address of 192.168.1.18 and PC-B is given an IP address of 192
    15·1 answer
  • Why is 0.3333333333333333 the output of print(1/6 + 1/6) in python?
    8·1 answer
  • Solve this for brainlest​
    10·1 answer
  • What are the main types of database end users,? Discuss the main activi-ties of each
    10·1 answer
  • Without using parentheses, enter a formula in cell F4 that
    11·1 answer
  • Select the three subjects studied in sports biomechanics.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!