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
motikmotik
3 years ago
11

Write an algorithm to print even numbers from 1 to 100

Computers and Technology
1 answer:
maxonik [38]3 years ago
8 0

Answer:

// Java solution

for ( int i = 0; i < 101; i++)

{

 if ( i % 2 == 0)

 {

     System.out.println( i + " ");

 }

}

Using modulus, whatever number we are currently on in our loop is evaluated to see if it is even. Any number divided by 2 that is even will not have a remainder, hence ==0. So we just print the numbers that satisfy that condition and we have all evens.

You might be interested in
Is a collection of limited versions of Microsoft office programs
alexgriva [62]
A Microsoft Office Suite.

 An office suite is a collection of Microsoft Office productivity software and is readily available for both Windows and Macintosh Operating System. A list of these programs includes, Microsoft Word, Excel, Access, Powerpoint, Publisher, and Outlook. Each of these programs serve a different purpose. 

3 0
3 years ago
All of the following are types of data storage devices except CD/DVD computer monitor digital cameras flash drive
horrorfan [7]

Computer Monitors are not storage devices.

3 0
3 years ago
When two or more people come together to communicate, each person brings their own ___________________.
dimulka [17.4K]

When two people come together,  each with a clear definition of their  identities, the potential can be astounding.  A successful communication is composed of two  individuals - each with a clearly defined sense  of her or his own identity.  

6 0
3 years ago
&gt;What is the output of the following code:
ozzi

Answer:

Given code output is "786".

Explanation:

Code:

list1 = [ 'cyber', 786 , 2.23, 'square', 70.2 ]#defining a list list1 that holds value in parameter

print (list1[1] )#use a print method that prints list index value

In the given code a list "list1" is declared that holds value in it and in the next step a print method is declared that prints the first index value of the list.

5 0
3 years ago
In one week, your company received the following quantities of e-mail messages. Monday 240 Tuesday 315 Wednesday 290 Thursday 18
Vika [28.1K]

Answer:

280

Explanation:

Average = (240 + 315 + 290 + 180 + 375) ÷ 5

= 1400 ÷ 5

= 280

Cheers

3 0
3 years ago
Other questions:
  • Most programming languages provide loop statements that help users iteratively process code. In Coral you can write loops that h
    15·1 answer
  • A sentinel value ________ and signals that there are no more values to be entered:____
    14·1 answer
  • Suppose you are an ISP that owns a / 22 IPv4 address block. Can you accommodate requests from six customers who need addresses f
    8·1 answer
  • You wouldn't think a simple shop like Dippy Donuts would be an interesting target for hackers. But look beyond the donuts and yo
    7·1 answer
  • Clasifica los documentos comerciales en activo, pasivo o patrimonial para cada operacion:
    14·1 answer
  • How do you think electronic spreadsheets have transformed businesses today?​
    6·1 answer
  • 100 POINTS!!!!!!!
    15·2 answers
  • Cho dãy A gồm N số nguyên a1,...aN. Hãy đếm tất cả các số âm hoặc không chia hết cho 5 trong dãy
    12·1 answer
  • . Question 2 Fill in the blank: R Markdown notebooks can be converted into HTML, PDF, and Word documents, slide presentations, a
    9·1 answer
  • When you try to move the desktop icon using the click and drag method and it doesn't move, what is the reason?​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!