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
Gnoma [55]
2 years ago
11

Write code to define a function named mymath. The function has three arguments in the following order: Boolean, Integer, and Int

eger. It returns an Integer. The function will return a value as follows: 1. If the Boolean variable is True, the function returns the sum of the two integers. 2. If the Boolean is False, then the function returns the value of the first integer - the value of the second Integer.
Computers and Technology
1 answer:
saveliy_v [14]2 years ago
7 0

Answer:

public class Main

{

public static void main(String[] args) {

Main m=new Main();

System.out.println(m.mymath(true,5,2)); // calling the function mymath

}

public int mymath(boolean a,int b,int c) // mymath function definition

{

if(a==true)

{

int d=b+c;

return d;

}

else{int e=b-c;

return e;

}

}

}

You might be interested in
How to delay sending an email in office 365
expeople1 [14]
You can’t it’s impossible unless your a hackers
3 0
3 years ago
Concept about borderless classroom because of technology​
Elan Coil [88]

Answer:

With Borderless Classroom Technology, every student remains a part of the classroom. ... That is to be 'as simple as a light switch' and as effective in lighting the learning experience as educators focused on students, not on technology." Borderless Classroom Technology is an extension of that philosophy.

HAS TO BE RIGHT- GOOGLE TOLD ME

5 0
3 years ago
A sense of scale tells us what about the objects in a picture?
monitta

Answer:

A. the size

Explanation:

7 0
3 years ago
Read 2 more answers
HELP ME !!!!!!!
ra1l [238]

Answer:

C. Protocol Identifier

3 0
3 years ago
Adam, a forensic investigator, is investigating an attack on the Microsoft Exchange Server of a large organization. As the first
OLga [1]

Answer:

The answer is letter C.

Explanation:

He is going to examine the file PRIV.STM

7 0
4 years ago
Other questions:
  • Operation code field is present in:
    7·1 answer
  • Explain one thing you will start doing as a passenger.
    10·2 answers
  • Which of the following is not a responsibility of a member of society?
    14·1 answer
  • What is one of the first power tools you’ll need as electrician
    15·1 answer
  • Which of the following is the easiest way for visitors to learn about a business while visiting a website?
    13·1 answer
  • In order to view the permissions assigned to each type of user for all the files located in a directory, which of the following
    12·1 answer
  • Name two different ways you can bring up the my computer folder
    9·2 answers
  • Because a chart is _______, it can be dragged to another area of the worksheet.
    13·1 answer
  • Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two
    9·1 answer
  • Cho lược đồ CSDL “Quản lý BÁN HÀNG” có các bảng như bên dưới. (Thuộc tính in đậm và
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!