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
What does the Control Panel's Display icon allow you to do?
UNO [17]

Answer: To have access to all the hardware and software settings in your computer system.

Explanation:

4 0
3 years ago
PLZ HELP NEEDS TO BE ANSWERED ASAP THANK YOU
Stells [14]

In python:

lst = ([])

largest = 0

while len(lst) != 6:

   user_number = int(input("Enter a number: "))

   lst.append(user_number)

   for i in lst:

       if i > largest:

           largest = i

   print(largest)

I hope this helps

7 0
3 years ago
Ann wants to save her presentation so she can work on it later. Which device on her computer can store this data long term?
Julli [10]
I believe it would be A. Hard drive.
5 0
3 years ago
Read 2 more answers
When you register to take classes, the registrar office pulls up a file full of
anzhelika [568]

Answer:

Database

Explanation:

Database software is intended to develop databases and to maintain, alter, access, and obtain useful data stored within them. It is often used to store, manage, and organize information such as field names, documents, and file structures in a database. it helps users to create their own databases to meet their business specifications and requirements. It provides data flexibility, as the storage process and formats can be modified without changing the entire program inside the database.

6 0
3 years ago
My laptop is 20℅ charged and then i shut down it . I dont turned it on for 2 days and also donot charge it now after 2 days it i
Tju [1.3M]

Answer:

__you need to charge it__

4 0
3 years ago
Other questions:
  • Design the below using an array// Sunrise Freight charges standard// per-pound shipping prices to the five states they serve// –
    6·1 answer
  • Reading is the process of transferring data, instructions, and information from memory to a storage medium.
    15·1 answer
  • What type of selection can be used in leu of switch/case?
    13·2 answers
  • Processing is handled by the computer’s central processing unit (cpu).​ <br> a. True <br> b. False
    6·1 answer
  • By observing human behavior,_______are able to understand the cause and effect relationship between the supply of things we want
    13·2 answers
  • My graphic card is : ASUS R7 370 What's the ideal temperature for the gpu ?
    5·2 answers
  • Cost Benefit Analyses (CBAs) cannot be calculated after controls have been functioning for a time, as observation over time prev
    13·1 answer
  • Scenes for films are almost always filmed in the same sequence they appear in the script.
    14·1 answer
  • Two friends can share 100 songs from their Bluetooth enabled mobile devices
    13·1 answer
  • POR FAVOR AYUDENME DIGAN SOLO 10 Ejemplos de Software de Sistema. SI NO REPRUEBO Y LE DOY CORONA
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!