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
NemiM [27]
3 years ago
6

Write a program that reads an integer and determines and prints whether it's odd or even. [Hint: Use the remainder operator (%).

An even number is a multiple of two. Any multiple of 2 leaves a remainder of zero when divided by 2.]
Computers and Technology
1 answer:
Sloan [31]3 years ago
4 0
<h2>Explanation:</h2>

The source code, written in Java, and a sample output have been attached to this response. It contains comments explaining certain parts of the code.

A few things to note are;

(i) The Scanner class is imported to allow user's interact with the program. This is done by writing the import statement at the top of the code as follows;

<em>import java.util.Scanner;</em>

<em />

(ii) An object of the Scanner class is created to receive inputs from the user. The object is called input and created as follows;

<em>Scanner input = new Scanner(System.in);</em>

(iii) Since the user is expected to enter an integer, the nextInt() method of the Scanner object is used to receive the integer and this is saved in a variable called <em>number. </em>i.e

<em>int number = input.nextInt();</em>

<em></em>

(iv) A number x, is even if its remainder when divided by 2 is 0. i.e

if x % 2 = 0, then x is even. Otherwise it is odd.

The user's input received and saved in a variable called <em>number </em>is then checked using if and else blocks to check if it is even or not and can be written as follows;

<em>if(number % 2 == 0){</em>

<em>    System.out.println(number + " is even");</em>

<em>}else {</em>

<em>    System.out.println(number + " is odd");</em>

<em>}</em>

You might be interested in
What does an effect allow you to do in<br> EarSketch?
Gnoma [55]

Answer:usbebdos did did I’d did d

Explanation:

Bash six ska over five. I did a sis a and

7 0
3 years ago
What is the purpose of installing updates on your computer?
Lostsunrise [7]

The purpose of adding updates to your computer are as follows:

  • Making sure your computer hardware can run the newest software programs
  • Ensuring the built-in virus protection software is up to date
  • Removing bugs and glitches from your operating system
  • Allowing your computer to run as fast as possible
4 0
2 years ago
a client has requested adjustments to the arrangement and placement of elements on an image. what does the client want changed?
qaws [65]

Considering the situation described above, the client wants the <u>image's recipe to be changed.</u>

<h3>What is the Image Recipe?</h3>

Image Recipes are characteristics of an image or picture. It includes features like shape, size, form, pattern, line, shadow, tone, color, contrast, positive space and negative space, etc.

Given that the client needs adjustments to the arrangement and placement of elements on an image, this is a request for a change in the image recipe.

Hence, in this case, it is concluded that the correct answer is "<u>the client wants the recipe of the image changed."</u>

Learn more about the Image Recipe here: brainly.com/question/1605430

6 0
2 years ago
Write a program to accept radius and find area of circle
Ilya [14]

Answer:

Change it however you'd like

Explanation:

from math import pi

def findArea(rad):

   return (rad**2) * pi

#test

print(f"Area of the circle: {findArea(5)}")

8 0
2 years ago
Read 2 more answers
Dell Computer uses recycled and recyclable materials in its product and packaging design in an effort to minimize damage to the
RoseWind [281]

Answer:

sustainability

Explanation:

Sustainability -

It refers to the method to meet the needs of the present generation without hampering the needs of the future generation as well , is referred to as sustainability .

The process of sustainability require to follow the concept of reuse and recycle to be safe for the environment .

The process is very safe for the planet , as it environmental friendly .

Hence , from the given scenario of the question ,

The correct answer is sustainability .

6 0
3 years ago
Other questions:
  • To move to the bottom of a document window, press the ____ key(s). ALT CTRL PAGE DOWN CTRL PAGE DOWN ALT PAGE DOWN PAGE DOWN
    11·1 answer
  • What is the left are if a slide in a presentation called
    15·1 answer
  • Which of these is not one of the main parts of an email
    9·1 answer
  • Your computer has a single hard disk w/ a single volume used by the C:\ drive. You have previously upgraded the disk to a dynami
    6·1 answer
  • One key to success in a career is to be an accomplished
    15·1 answer
  • Software enables users to create documents
    13·1 answer
  • BRAINLIEST You have a small company and want to keep your costs low, but it is important your employees share data. Which networ
    13·2 answers
  • Designing a video game takes tons of creativity. What inspires your personal creativity and ideas for video games? Explain and g
    15·1 answer
  • Some applications required advanced storage solutions are available to provide fault tolerance and high performance.
    13·1 answer
  • Assume there are two variables, k and m, each already associated with a positive integer value and further assume that k's value
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!