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
labwork [276]
2 years ago
7

How to use boolean to check if math answer is correct java

Computers and Technology
2 answers:
allsm [11]2 years ago
7 0

Boolean can be use to check math as follows;

  • 6 < 5
  • 8 > 7
  • 6 == 9

<h3>What are Booleans?</h3>

Booleans is a datatype with two possible values namely True and False.

The Boolean can be denoted as bool.

In programming its often use to check if a mathematical expression or statement are True or False.

Therefore, let's use it in mathematical expression;

6 < 5

8 > 7

6 == 9

The first expression will return False.

The second expression will return True.

The third expression will return False.  

learn more on Booleans here: brainly.com/question/14120893

#SPJ11

Lubov Fominskaja [6]2 years ago
4 0

Answer:

You can use an if statement since it is a Boolean type of function.

An if statement has to be true to be used. A double == is the best when checking.

These are all the possible symbols you can use to check if the math answer is correct: || , &&, <, >, <=, >=, ^, != , ==

As seen in the images, if x is the same value as y it is correct. However if it is not, it is wrong.

You might be interested in
Which of these statements are true of verifying that a program’s code is fixed? Check all of the boxes that apply.
aksik [14]

Answer:

Its C.

Explanation:

hope it helps !

mark me brainliest :))

7 0
3 years ago
Read 2 more answers
In programming 5/2 is an example of what math?
wlad13 [49]

Answer:

division

Explanation:

/ in programming language is divide ÷

6 0
2 years ago
Read 2 more answers
The elements of an integer-valued array can be initialized so that a[i] == i in a recursive fashion as follows: An array of size
blondinia [14]

Answer:

public static void init(int[] arr, int n) {

    if (n==0)

        arr[0] = 0;

    else {

        arr[n-1] = n - 1;

        init(arr, n-1);

    }

}

Explanation:

Create a method called init that takes two parameters, an array and the number of elements in the array

When n reaches 0, set the first element to 0 (This is a base for our recursive method)

Otherwise, set the element in index i to i

Call the init inside the init, this is the recursion part, with same array but decrease the number of elements by 1 (We decrease the number of element by 1 in each time so that it goes through all the elements in the array)

4 0
3 years ago
Question 5 a remote access server is typically implemented on a server class operating system, such as windows server 2008 r2 ru
Reika [66]
Answer: <span>Routing & </span>Remote Access<span> (RRAS)</span>
7 0
3 years ago
What is a collection?
Andreyy89
Collections are used to store, retrieve, manipulate, and communicate aggregate data.
7 0
3 years ago
Other questions:
  • According to the article in WikiAnswers, digital communication systems have more benefits than analog systems. They are faster a
    10·2 answers
  • How are different types of cars similar and different?
    10·1 answer
  • Which one of these variables has an illegal name?
    11·1 answer
  • How to create a tender statement in database management?
    5·1 answer
  • What executable programs have names that are just one character long, and what do they do??
    5·1 answer
  • When I comes to saving money, what is good rule of thumb
    5·1 answer
  • Write an expression that executes the loop body as long as the user enters a non-negative number. Note: If the submitted code ha
    14·1 answer
  • can I join some1 zoom meeting just for fun but some1 else do something funny or something I WONT BE DOING ANYTHING FUNNY IM TO S
    10·1 answer
  • Mô tả những lợi ích của việc sử dụng đa xử lý không đồng nhất trong một hệ thống di động
    8·1 answer
  • The main components of a computer ar a hardware and software b) disc and monitor c) system and unit d) communication devices. ​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!