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
Which of the following is true about REST?
goblinko [34]

Answer:

D

Explanation:

7 0
3 years ago
How much time does a gold chest take to open
MaRussiya [10]

Gold chest takes 8 hours to open or unlock.

<u>Explanation:</u>

Clash royale is a game which has been developed and published with the help of a super cell. It is a video game. Many players can play this game at the same time. In the sense, clash royale is a multi player game.

In this game, the players who are playing the game are awarded with the gold chest. They are also awarded with the gems. In order to unlock or open a gold chest eight hours are needed. Apart from this there is an other way also with which the gold chest can be unlocked. It can be unlocked with the help of forty eight gems.

7 0
3 years ago
4013
grigory [225]

Answer:

IM YOUR DADDY

Explanation:

5 0
3 years ago
Read 2 more answers
Can anyone help me with these assignments??? Hands On Assignments- Insertion of Symbols, Special Characters, and Images.... and
Alekssandra [29.7K]

Answer:

yes send me the worksheet

Explanation:

5 0
3 years ago
Documenting Business Requirements helps developers control the scope of the system and prevents users from claiming that the new
tiny-mole [99]

Answer:

The answer is "True".

Explanation:

Industry demands documentation enables developers to monitor the system's range and protects users claims, that somehow the new system will not accomplish their business goals.

  • The main goal of this report is to offer everyone to be transparent, about what should be accomplished and when.  
  • It is the new business plan, that should be outlined in detail, that's why the given statement is true.
3 0
3 years ago
Other questions:
  • Ideation includes all of the following EXCEPT
    5·1 answer
  • 4
    10·1 answer
  • True or false? when intel places a sticker on computers showing their chip is inside, they are demonstrating their visible value
    7·1 answer
  • Write a C++ program that determines if a given string is a palindrome. A palindrome is a word or phrase that reads the same back
    6·1 answer
  • Given the integer variables x, y, and z, write a fragment of code that assigns the smallest of x, y, and z to another integer va
    7·1 answer
  • The __________ method can determine whether a string contains a value that can be converted to a specific data type before it is
    12·1 answer
  • According to your text, three factors are responsible for the rapid rise in new product development. They are faster and more ec
    9·1 answer
  • Write assembly programs with the following I/O
    15·1 answer
  • Johnathan was assigned to complete a project with three other people. What benefit will he get from working with the team?
    15·1 answer
  • What product use programmable control?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!