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
MrRa [10]
2 years ago
10

What is the output of the following program?

Computers and Technology
1 answer:
Katen [24]2 years ago
4 0

Answer:

The output of the following code:

first call: 5, 6, 3

second call: 9, 10, 3

third call: 13, 14, 3

sh: 1: pause: not found

Explanation:

Description to the following method can be described as follows:

  • In the given code, a "Find" method is defined, that accepts three integer parameter, in which two variable is "a and b" is reference variable and c is a normal integer variable.
  • Inside the method, variable a adds "b+c" and in the next line, variable b adds a+1, and invariable c adds b+2.
  • Inside the main method, the find method calls three times and prints its value, for the first time it will print 5, 6, and 3. The second time it will print 9,10, and 3, and in the third time, it will print 13, 14, and 3.
You might be interested in
If you want help using drawing, word processing, and e-mail programs, the best place for you to find it is through the Start men
ZanzabumX [31]

Answer:

True

Explanation:

True

5 0
2 years ago
How to reload ingenuity when a pulsating blue thing is there
Hatshy [7]
Todo is very important
4 0
3 years ago
What do you think is the most important factor affecting the collection of digital data and what impact do you think that this f
borishaifa [10]

<u>Answer:</u>

<u>Privacy concerns.</u>

<u>Explanation:</u>

Privacy concerns have played an important role in how we collect digital data. For example, privacy activists believe that an individual has the right to know how his or her information is being used and that such an individual also has the right to withhold such information.

Such issues have affected the ability of law enforcement agencies to investigate criminal activities. For example, an individual who is accused of a crime may claim a <em>right to withhold his personal information, such as his mobile device, and thus he refuses to give out such information.</em>

4 0
3 years ago
Create an application for a library and name it FineForOverdueBooks. TheMain() method asks the user to input the number of books
andrew11 [14]

Answer:

//The Scanner class is imported which allow the program to receive user input

import java.util.Scanner;

//Class Solution is defined to hold problem solution

public class Solution {

   // The main method which signify the begining of program execution

   public static void main(String args[]) {

       // Scanner object 'scan' is defined to receive input from user keyboard

       Scanner scan = new Scanner(System.in);

       // A prompt is display asking the user to enter number of books

       System.out.println("Please enter number of books: ");

       // the user response is assigned to numberOfBook

       int numberOfBook = scan.nextInt();

       // A prompt is displayed asking the user to enter the number of days over due

       System.out.println("Please enter number of days over due: ");

       // the user response is assigned to numberOfDaysOverDue

       int numberOfDaysOverDue = scan.nextInt();

       //displayFine method is called with numberOfBook and numberOfDaysOverDue as arguments

       displayFine(numberOfBook, numberOfDaysOverDue);

   

   }

   

   //displayFine method is declared having two parameters

   public static void displayFine(int bookNumber, int daysOverDue){

       // fine for first seven days is 10cent which is converted to $0.10

       double firstSevenDay = 0.10;

       // fine for more than seven days is 20cent which is converted to $0.20

       double moreThanSevenDay = 0.20;

       // the fine to be paid is declared

       double fine = 0;

       // fine is calculated in the following block

       if(daysOverDue <= 7){

           //the fine if the over due days is less than or equal 7

           fine = bookNumber * daysOverDue * firstSevenDay;

       } else{

           // the extra days on top of the first seven days is calculated and assigned to extraDays

           int extraDays = daysOverDue - 7;

           //fine for first seven days is calculated

           double fineFirstSevenDays = bookNumber * 7 * firstSevenDay;

           // fine for the extradays is calculated

           double fineMoreThanSevenDays = bookNumber * extraDays * moreThanSevenDay;

           // the total fine is calculated by adding fine for first seven days and the extra days

           fine = fineFirstSevenDays + fineMoreThanSevenDays;

       }

       // The total fine is displayed to the user in a nice format.

       System.out.printf("The fine for " + bookNumber + " book(s) for " + daysOverDue + " day(s) is: $%.02f", fine);

   }

}

Explanation:

The program first import Scanner class to allow the program receive user input. Then the class Solution was defined and the main method was declared. In the main method, user is asked for number of books and days over due which are assigned to numberOfBook and numberOfDaysOverDue. The two variable are passed as arguments to the displayFine method.

Next, the displayFine method was defined and the fine for the first seven days is calculated first if the due days is less than or equal seven. Else, the fine is calculated for the first seven days and then the extra days.

The fine is finally displayed to the user.

4 0
3 years ago
Number of byte required to store illumination
Rina8888 [55]
If we are talking about light that’s an whole different subject
5 0
3 years ago
Other questions:
  • What is the function of the keyboard shortcut Ctrl+Shift+E in a word processor
    5·2 answers
  • In what country did true printing first take place?
    12·2 answers
  • PLEASE HELP
    12·2 answers
  • Given the strings s1 and s2 that are of the same length, create a new string consisting of the first character of s1 followed by
    12·1 answer
  • Which Windows installation method requires that you manually rename computers after the installation?​
    12·1 answer
  • Write a program that will generate a personalized invitation within a text file for each guest in the guest list file using the
    15·1 answer
  • Ranboo back story? (not homework i just wanna find some ppl who are interested in the same things) ft. the reddie meme
    9·2 answers
  • Assume that class BankAccount exists, and that it has a constructor that sets the private field balance, and that setBalance and
    13·1 answer
  • A ____________ is a collection of commands given a name.
    11·1 answer
  • Please help……Your friend is taking images from all over the internet without giving credit to the sources. He tells you that it’
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!