Why do we use functions?
To stop the program from repeating.
To test for true and false.
To simplify code.
To ask the user for input.

Answers

Answer 1
to stop the program from repeating :)
Answer 2
To stop the program from repeating. That is the answer

Related Questions

PLZ ANSWER WORTH 30 POINTS!!
If you want to alphabetize your rows, you should use the_______command.

A. Filter
B. View
C. Merge and Center
D. Sort

Answers

Answer:

D. Sort

Explanation:

The sort command will sort the rows into alphabetical order.

What happens when in Word 2016 when the home ribbon tab is clicked on?

Answers

Answer: The home tab is opened up.

Explanation:

When using Word 2016 and the home ribbon tab is clicked on, the home tab is opened up. This tab houses the very basic functions of the word document, a lot of which have to be used if even a simple document needs to be typed.

This tab allows you to change the font as well as the font size and color. The page alignment is also set here as well as the text direction. Even headings can be customized here.

There are a lot more functions but the high level point is that the home tab is where the most basic of functions are, as shown in the attachment.

Which printing method transfers the ink from a metal plate to a rubber blanket?
A.
digital printer
B.
offset printer
C.
flexo printer
D.
gravure printer

Answers

Answer:

B. Offset printer is the correct answer

A sorted list of numbers contains 500 elements. Which of the following is closest to the maximum number of list elements that will be examined when performing a binary search for a value in the list?
A.) 10

B.) 50

C.) 250

D.) 500

Answers

The answer is B.

hope its correct

Following are the calculation to the maximum number of list elements:

The binary search algorithm starts in the center of the sorted list and continuously removes half of the elements until the target data is known or all of the items are removed. A list of 500 elements would be chopped in half up to 9 times (with a total of 10 elements examined).The particular prerequisites with 500 items and are decreased to 250 elements, then 125 aspects, then 62 elements, 31 aspects, 15 aspects, 7 aspects, 3 aspects, and ultimately 1 element.

Therefore, the final answer is "Option A"

Learn more about the binary search:

brainly.com/question/20712586

Consider the following code segment, where num is an integer variable.

int [][] arr = {{11, 13, 14 ,15},
{12, 18, 17, 26},
{13, 21, 26, 29},
{14, 17, 22, 28}};
for (int j = 0; j < arr.length; j++)
{
for (int k = 0; k < arr[0].length; k++)
{ if (arr[j][k] == num){System.out.print(j + k + arr[j][k] + " ");
}
}
}

What is printed when num has the value 14?

Answers

Answer:

Following are the complete code to the given question:

public class Main//main class

{

public static void main(String[] args) //main method

{

    int [][] arr = {{11, 13, 14 ,15},{12, 18, 17, 26},{13, 21, 26, 29},{14, 17, 22, 28}};//defining a 2D array

    int num=14;//defining an integer variable that holds a value 14

       for (int j = 0; j < arr.length; j++)//defining for loop to hold row value

       {

       for (int k = 0; k < arr[0].length; k++)//defining for loop to hold column value

       {

           if (arr[j][k] == num)//defining if block that checks num value

           {

               System.out.print(j + k + arr[j][k] + " ");//print value

           }

       }

       }

}

}

Output:

16 17

Explanation:

In the question, we use the "length" function that is used to finds the number of rows in the array. In this, the array has the 4 rows when j=0 and k=2 it found the value and add with its index value that is 0+2+14= 16.similarly when j=3 and k=0 then it found and adds the value which is equal to 3+0+14=17.So, the output is "16,17".  

To convert microseconds to nanoseconds: a. Take the reciprocal of the number of microseconds. b. Multiply the number of microseconds by 0.001. c. Multiply the number of microseconds by 0.000001. d. Multiply the number of microseconds by 1,000. e. Multiply the number of microseconds by 1,000,000.

Answers

Answer: D. Multiply the number of microseconds by 1,000.

Explanation:

In order to convert microseconds to nanoseconds, it should be noted that one should multiply the number of microseconds by 1,000.

For example, if we want to convert 12 microseconds to nanoseconds. This will be:

= 12 × 1000

= 12000 nanoseconds.

Therefore, with regards to the information given above, the correct option is D.

A sense of scale tells us what about the objects in a picture?
O Their size
O Their color
Their placement
O Their sharpness

Answers

Answer:

A. the size

Explanation:

The ranks are: 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King, Ace. The suits are: Clubs, Diamonds, Hearts, Spades.
For this question, we represent each rank by a string of length one:
’2’ to ’9’ for 2 to 9 respectively, ’T’ for 10,
’J’ for Jack, ’Q’ for Queen, ’K’ for King, ’A’ for Ace.
We also represent each suit by a string of length one:
’C’ for Clubs, ’D’ for Diamonds, ’H’ for Hearts, ’S’ for Spades.
Fall 2014
Finally, we represent a card by a string of length 2, the first character being the rank and the second being the suit. For example, Queen of Hearts is represented by ’QH’, and 3 of Clubs is represented by ’3C’.
In the game of bridge, a hand consists of 13 cards, which we represent by a list of cards. When given a hand, here is the common way to count points.
High rank points:
• For each Ace, we count 4 points.
• For each King, we count 3 points. • For each Queen, we count 2 points. • For each Jack, we count 1 point.
Short suit points:
• For each suit, we count 1 point if the hand contains exactly two cards of that suit. • For each suit, we count 2 points if the hand contains exactly one card of that suit. • For each suit, we count 3 points if the hand contains no cards of that suit.
On the next page, write a function which takes a hand as input and returns the number of points in that hand.

Answers

Answer:

its b

Explanation:

How wireless communication might affect the development and implementations of internet of things?​

Answers

If people send a link don’t try them report them!

I need help with this question!!

Answers

Answer:

True

Explanation:

it just to make sense

What is the difference between encryption and hashing?

Answers

Hashing and Encryption have different functions. Encryption includes encryption and decryption process while hashing is a one-way process that changes data into the message digest which is irreversible. ...

Hashing algorithm. A hash can simply be defined as a number generated from a string of text. ...

Encryption. ...

The difference between hashing and encryption. ...

Encryption and Hashing are both ways in which information is secured. The

differences between Encryption and Hashing include the following:

Encryption is a two- way process which involves encoding and decoding

while Hashing is a one way process  which involves encoding.

Encrypted information can be retrieved through decoding and getting a

plain text while Hashed information can't be retrieved as a plain text but as

hash value.

Read more about Encryption and hashing here https://brainly.com/question/9979590

Which statement describing the arcade games played in the 1970s is true?
- These games were less advanced than the earlier games because they were designed for devices with CPUs.
- Early arcade games featured extensive dialogue between characters.
- The gameplay failed to attract players.
- The visual were not engaging.

Answers

Answer:

The visuals were not engaging.

Explanation:

If you were practicing keyboarding and the exercise contained the letters j, k, l, m, n, and b, what section of the
keyboard are you practicing?
upper, home row, Right, or Left

Answers

The answer is left.

Answer:

it's the right.

Explanation:

Type the correct answer in the box. Spell all words correctly.
In a content file, Rick wants to add information that gives directions about how the content will be used. He also wants it to be easily differentiable from the content. Which language should Rick use for this?
Rick can use the _____
language to give directions about the content.

Answers

Answer: markup

Explanation:

Markup is used to give directions about the arrangement of an image/text.

Answer:

Rick can use the markup language to give directions about the content.

Explanation:

I got it right on the test for Edmentum.

What is the first step you should take when you want to open a savings account? A. Present your photo ID to the bank representative. B. Go to the bank and fill out an application. C. Make your initial deposit. D. Review the different savings account options that your blunk offers.​

Answers

Answer: B

Explanation:

The first step you should take when you want to open a savings account is the photo id

pleasee telllllllllllllllllll​

Answers

Explanation:

It allows you to know your flawsIt helps you to improve yourself

primary purpose of ms Excel​

Answers

MS Excel is a spreadsheet programme developed by Microsoft in 1985, with the sole purpose of helping businesses compile all their financial data, yearly credit, and yearly debit sheets. Fast forward to the future after 31 years, it is now the most commonly used program for creating graphs and pivot tables.

When you use the Query Editor to run a query that returns an xml type, theManagement Studio displays the XML data in blue with underlining to indicate that it is what?
a. link
b. misspelled
c. XML blue
d. XML Data
give brainliest to correct answer. no links and need asap please, thanks

Answers

Answer is c hope this helps

hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii

Answers

Answer:

hhhhhhhhhhhhhhhhhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii

Explanation:

Komunikasi, dengan program ini kita juga bisa berkomunikasi dengan pengguna lain.Program ini sudah dirancang untuk bisa saling bertukar informasi dalam bentuk jaringan dimana orang lain bisa membuka lembar kerja kita dari terminal (komputer) yang berlainan,bahkan ia juga bisa melakukan perubahan pada lembar kerja yang sama pada saat yang bersamaan pula. Kata pengguna lain dapat disebut dengan kata:_____________

Answers

Answer:

what language is this?

Explanation:

Write a recursive method named power that accepts two integers representing a base and an exponent and returns the base raised to that exponent. For example, the call of power(3, 4) should return 34 or 81 . If the exponent passed is negative, throw an IllegalArgumentException. Do not use loops or auxiliary data structures; solve the problem recursively. Also do not use the provided Java pow method in your solution.

Answers

Answer:

The method in java is as follows:

   public static int power(int num, int exp){

       if(exp == 0){            return 1;        }

       if(exp < 0){

           throw new IllegalArgumentException("Positive exponents only");        }

       else{            return (num*power(num, exp-1));        }

   }

Where

[tex]num\to[/tex] base

[tex]exp \to[/tex] exponent

Explanation:

This defines the method

   public static int power(int num, int exp){

This represents the base case, where the exponent is 0

       if(exp == 0){

If yes, the function returns 1

           return 1;        }

If exponent is negative, this throws illegal argument exception

       if(exp < 0){

           throw new IllegalArgumentException("Positive exponents only");        }

If exponents is positive, this calls the function recursively

       else{            return (num*power(num, exp-1));        }

   }

Choose the item which best describes the free frame list. 1. a per process data structure of available physical memory 2. a global data structure of available logical memory 3. a global data structure of available physical memory 4. a global data structure of available secondary disk space

Answers

Answer:

A global data structure of available logical memory ( Option 2 )

Explanation:

A Free list is a data structure connecting unallotted regions in a memory together in a linked list (scheme for dynamic/logical memory allocation) , hence a free frame list is a global data structure of available Logical memory .

WILL GIVE BRAINLIEST + 50 points!!
Quincy would like to view the contents of a specific message in his Inbox. A portion of his computer screen is shown.


What should Quincy do in order to complete this task?

Click on the Inbox in the Navigation Pane, and click on the specific message in the Folder Pane to display its contents.
Click on the Inbox in the Outlook Today window, and click on the specific message in the Folder Pane to display its contents.
Double-click the message’s header in the Outlook Today window, and right-click on the specific message to display its contents.
Double-click the Mail option in the Navigation Pane, and right-click on the specific message to display its contents.

Answers

Answer:

i put a

Explanation:

Answer:

A

Explanation:

please mark brainliest i only need 1 more :/

Which of the following are recommended ways to address run-time errors? Choose all that apply.

Delete the suspect lines of code and issue the program without that function.

Add error routines that allow the program to execute fully even when unanticipated data is entered.

Create error messages to alert the user to an error in data entry.

Create controls in the program that ensure the input of proper data.

Answers

Answer:

2. Add error routines that allow the program to execute fully even when unanticipated data is entered.

3. Create error messages to alert the user to an error in data entry.

4. Create controls in the program that ensure the input of proper data.

Explanation:

Mark me brainliest plz

Answer:

2 3 4 i got it right

Explanation:

Given positive integer n, write a for loop that outputs the even numbers from n down to 0. If n is odd, start with the next lower even number.

Answers

Answer:

if(n % 2 == 0){

   for(int i = n; i >= 0; i-=2){

        System.out.println(i);

    }

}

else{

     for(int i = n - 1; i >= 0; i-=2){

        System.out.println(i);

     }

}

Sample output

Output when n = 12

12

10

8

6

4

2

0

Output when n = 21

20

18

16

14

12

10

8

6

4

2

0

Explanation:

The above code is written in Java.

The if block checks if n is even by finding the modulus/remainder of n with 2.  If the remainder is 0, then n is even. If n is even, then the for loop starts at i = n. At each cycle of the loop, the value of i is reduced by 2 and the value is outputted to the console.

If n is odd, then the else block is executed. In this case, the for loop starts at i = n - 1 which is the next lower even number. At each cycle of the loop, the value of i is reduced by 2 and the value is outputted to the console.

Sample outputs for given values of n have been provided above.

i need the solution to this task please anyone

Answers

Answer:

.

Explanation:

Populations are effected by the birth and death rate, as well as the number of people who move in and out each year. The birth rate is the percentage increase of the population due to births and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data:
• The starting size of a population
• The annual birth rate
• The annual death rate
• The number of years to display
Write a function that calculates the size of the population for a year. The formula is
N = P + BP − DP
where N is the new population size, P is the previous population size, B is the birth rate, and D is the death rate.
Input Validation: Do not accept numbers less than 2 for the starting size. Do not accept negative numbers for birth rate or death rate. Do not accept numbers less than 1 for the number of years.
#include
using namespace std;
double calcOfPopulation(double, double, double);
double inputValidate(double, int);
int main()
{
double P, // population size
B, // birth rate %
D, // death rate %
num_years;
cout << "Starting size of population: ";
P = inputValidate(P, 2);
cout << "Annual birth rate: %";
B = inputValidate(B, 0);
cout << "Annual death rate: %";
D = inputValidate(D, 0);
cout << "Number of years to display: ";
num_years = inputValidate(num_years, 1);
cout << "Population size for "
<< num_years << " years "
<< " = "
<< (calcOfPopulation(P, B, D) * num_years)
<< endl;
return 0;
} // END int main()
double inputValidate(double number, int limit)
{
while(!(cin >> number) || number < limit)
{
cout << "Error. Number must not be "
<< " 0 or greater:";
cin.clear();
cin.ignore(numeric_limits::max(), '\n');
}
return number;
}
double calcOfPopulation(double P, double B, double D)
{
B *= .01; // 3.33% = .0333
D *= .01; // 4.44% = .0444
return P + (B * P) - (D * P);

Answers

Answer:

See attachment for program source file

Explanation:

The source code in the question is not incorrect; just that, it was poorly formatted.

So, what I did it that:

I edited the source code to be in the right formats.numeric_limits needs the <limits> header file to work properly. The <limits> header file was not included in the original source file; so, I added #include<limits> at the beginning of the source fileI corrected the wrongly declared function prototypes.

See attachment for the modified program source file

high quality permanent output can be produced using a​

Answers

Answer:

Using a printer of high efficiency cartilage.


Landing pages in a foreign language should never be rated fully meets?

Answers

Answer:

if the landing page provides all kind information of information as to that site people usually like it or will most likely enjoy it

BRAINLIEST?????

Explanation:

pleaseeeeeeee tellllllllllllllllllllll​

Answers

Answer:

digital communications will be the correct answer

Answer:

non verbal communication is the answer

Other Questions
AB is tangent to circle O if AO = 30 and bc = 48 what is AB Which group of words are signal words for cause and effect? *since, so, because, due to the facttoday, meanwhileabove, below, under, nextO first, last, then, finally HELP ME PLEASEEEE I WILL GIVE THANKS AND BRANILYEST!!! PLZZZZZ12. How did the Great Depression affect minority groups? Give at least 3 examples.13. What were some cultural changes during the 1920s and 30s? Give at least 3 examples.What inventions influenced or affected life in the 1920s and 30s? Give at least 3 examples.15. Explain how WWI and the Great Depression will lead to WWII. answer now this plssss Find the length for c. c=_in a.Find an equation of the line perpendicular to the graph of 4x 2y = 9 that passes through the point at (4, 6).V = 25 + 8dy = 2x + 81E-X + 82b.-- 82 4. What is the total mass of ice that can be vaporized by 2100 kJ of heat energy?(Assume the molar heat of vaporization of ice is 41 kJ/mol.) PLS I NEED HELP FASTFind the surface area of the cone. PLS HELP ME FINISH THIS THANKS I need this please help me What is the purpose of the vas deferens? *Make spermStore spermTransport spermEjaculate spermTisind the picture of the sperm above which part of the onermell Why might the port of New Orleans have been so critical to other parties involved? What is the name of the piece above? Find the geometric mean between 6 and 48 given the sequence (3,6,12,24,48,96) Which expression is equivalent to 4 (3n - 5)?On - 207-912n - 512n - 20Done - What motivated people to find an all water trade route to Asia?1) better lives for the people of Asia 2) kings/monarchs offered incentives to explores 3)kings discouraged new trade routes via the seas4) people could not travel via the seas at this time pleaseeeeeeeeeee help me Which of the following statements is TRUE about heart rate and exercise? A.It is best to exercise your heart as hard as possible.B.Maximum heart rate can be calculated by taking 220 minus your age.C.Your recommended exercise heart rate is 30% of your maximum heart rate.D.All of the above are true statements. Given square WXYZ. If ZY = 20, find WV. Write your response in the form WV=_____. BRAINIEST ANSWER HELP:(Put THE SPANISH WORDS YOU SEE INTO A SENTENCE WRITE THE SENTENCE IN SPANISH THEN IN ENGLISH There should be 10 sentences because there are 10 words thank you!!!