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
An iPad Is An Example Of Which Type Of Computer?
Monica [59]
B.tablet because it is technically not a computer in traditional sence but a hand held device.
<span />
5 0
3 years ago
Read 2 more answers
P**nhub or x-videos or other
Colt1911 [192]
U shouldnt be watching them, Idc how old u are.
3 0
3 years ago
Piers wants to take a course on XML. He is a certified web designer, but he has not used XML before. How can he use XML to impro
PIT_PIT [208]

Answer:

Check Explanation (last paragraph, please).

Explanation:

The acronym "XML" simply stand for Extensible Markup Language and it is a programming language that is for coding infomation or data.

Extensible Markup Language(XML) is very acceptable and whenever one read or search a website that uses XML, it gives viewers good experience.

Piers can use XML to improve his website creations through the declaration of a namespace which has an integral part to a script element. The tags in XML does not have limitation like other languages. Also, Extensible Markup Language(XML) does not need to be updated all the time in as much as the website itself is being updated.

7 0
3 years ago
Search engines use indexes created by web _________ to provide fast searches.
Nastasia [14]
Search engines use indexes created by web crawlers to provide fast searches.
3 0
3 years ago
One reason it is important to write code that is readable is that
kramer

Answer:

The answer is D:)

Explanation:

D) it makes it easier to follow when revisions or updates are called for.

8 0
3 years ago
Read 2 more answers
Other questions:
  • What identifies available computers through the internet?
    14·1 answer
  • Suppose a developer gets class XYZ files and documentation from a subcontractor. This class does not implement the Comparable in
    9·1 answer
  • Anyone want to join my dîšćòrd
    8·2 answers
  • If you were setting up a network with 100 nodes and you wanted no more than 25 nodes per segment: what devices and connections w
    9·1 answer
  • A type of Knowledge Management System is called
    5·1 answer
  • If a client is found _________ the NAP will attempt to make it _______. Group of answer choices A. non-compliant, compliant B. s
    13·2 answers
  • Describe how catching exceptions can help with file errors. Write three Python examples that actually generate file errors on yo
    12·1 answer
  • Ben is writing a paper for his college history class, and he wants to include some information he found on a Web site. What are
    5·1 answer
  • When looking at aggregated logs, you are seeing a large percentage of Windows hosts connecting to an Internet Protocol (IP) addr
    5·1 answer
  • Which type of evidence should victims collect to help officials catch cyber bullies?home addressesbirthdayssocial media username
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!