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
sammy [17]
3 years ago
9

Analyze the following code (in both cases number has been declared and initialized): Code 1: boolean even; if (number % 2 == 0)

even = true; else even = false; Code 2: boolean even = (number % 2 == 0);
Computers and Technology
1 answer:
shusha [124]3 years ago
8 0

Answer:

Both codes are correct.The value of even is true when the number is even.

Explanation:

Code 1:

number %2 ==0 means that when dividing number by 2 is the remainder coming out is zero.If it is true then even becomes is true if it is false then else statement is executes in which even becomes false.Means the number is odd.This code is simple and easy to understand.

Code 2:-

This code is a bit tricky and takes time to understand.even becomes true

when the number is divisible by 0 and false when it is not.

You might be interested in
What is the main idea of this article? Please someone help me. I will give brainliest answer
mart [117]
The main idea of this article is that theme parks are conducting scientific research that is benefiting the community. Hope this helps!
8 0
3 years ago
Why are people's visions of utopias and dystopias subjective?
Leno4ka [110]

Answer:

D. Because the technology needed for one person's utopia may be what creates disaster for another person's dystopia.

Explanation:

3 0
2 years ago
Is techonology better? Lot of votes needed.
Nataliya [291]
In some ways yes but others... not so much. we have access to amazing things that can help so many people and some are tearing people apart or are used for illegal things. its really everyone's own opinion because of some interactions (positive or negative) that can influence them.
5 0
3 years ago
In 3–5 sentences, describe how technology helps business professionals to be more efficient.
Vsevolod [243]

Technology helps business professionals, keep more organized, communicate better, and effectively keeps businesses secure. Technology helps keep employee information and business paper work more organized using computers and software; while making it easier to communicate with employee's using e-mail and memo's.

if wrong sry :(

3 0
3 years ago
Read 2 more answers
Which of the following is not true about network design?Group of answer choicesIn designing LAN networks, network designers tend
sergey [27]

Answer:

In designing LAN networks, network designers tend to design err on the side of providing for less capacity than what is currently necessary.

Explanation:

In designing LAN networks, network designers tend to design err on the side of providing for less capacity than what is currently necessary is not true about network design.

8 0
3 years ago
Other questions:
  • To specify grouping and sorting for a report, click the ____ button on the design tab in layout view.
    14·1 answer
  • A user clicked an email link that led to a website than infected the workstation with a virus. The virus encrypted all the netwo
    10·1 answer
  • Write a program which:
    10·1 answer
  • Explain the components of Information System?​
    13·1 answer
  • Declare a char array named line of size 50, and write a statement that reads in the next line of console input into this array.
    6·1 answer
  • Which of the following might cause a shift from PPF1 to PPF2? I. A new source of high quality denim fabric. II. A new lighter me
    12·1 answer
  • A chemistry teacher colleague of yours uses video regularly in their courses, but commented to you about how much time it takes
    15·2 answers
  • Menus are attached to the windows by calling
    15·1 answer
  • I'm getting pretty desperate plz help me, I'll give brainiest, and ill make a free question worth 100 points this is for coding
    10·1 answer
  • Const x = 0;
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!