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
Georgia [21]
3 years ago
14

Create an application named Percentages whose main() method holds two double variables. Assign values to the variables. Pass bot

h variables to a method named computePercent() that displays the two values and the value of the first number as a percentage of the second one. For example, if the numbers are 2.0 and 5.0, the method should display a statement similar to "2.0 is 40 percent of 5.0." Then call the method a second time, passing the values in reverse order.
Computers and Technology
1 answer:
lbvjy [14]3 years ago
8 0

Answer:

The codes below implement the problem statements

Explanation:

public class Percentages {

public static void computePercent (int a,int b)

{

System.out.println(a+" is "+(a*100/b)+"% of "+b);    

}

 

public static void main(String []args)

{

int a=2;

int b=5;

computePercent(a,b);

computePercent(b,a);

}

}

<u> </u>

<u>Part(b) </u>

import java.util.*;

public class Percentages {

public static void computePercent (int a,int b)

{

System.out.println(a+" is "+(a*100/b)+"% of "+b);

}

 

public static void main(String []args)

{

Scanner s= new Scanner(System.in);

int a=s.nextInt();

int b=s.nextInt();

computePercent(a,b);

computePercent(b,a);

}

}

You might be interested in
Several of the items below indicate the steps required to add a slide to a presentation. Select those steps and indicate the ord
ss7ja [257]

Answer:

Click on the New Slide icon.  2.

Enter the slide position desired. N/A

Click where you want to add the slide.  1.

Select New Slide from the Tools menu.  3.

Switch to the Normal or Slide Sorter view. 4.

Switch to the Notes or Outline view. 5.

Explanation:

You can never enter the slide position desired, and you need to click on the slide after which you want the new slide to be placed.  Thus, enter the slide position desired is not applicable, and you need to click where you want to add the slide, and more accurately after which. Hence, this is the 1st. Now you need to click on the new slide icon. Then you need to select the new slides from the tools menu. The slide will appear in Normal view, and you can design the slide now as well as add the notes. You can then move to slide sorter view to arrange the slides, or you can arrange from the slide tab as well. Finally to check(edit) the notes and outline you can change the view to notes or Outline view. Hence, the above answer.

Keep in mind that through presenter view, you can make the slide show where you can see the slides and your notes, and the listeners can see the slides only.

7 0
3 years ago
A __________ constant is a name that references a value that cannot be changed while the program runs.
asambeis [7]

Answer:

Explanation:

A constant is a name that references a value that cannot be changed while the program runs

Example in Javascript:

const x = 5;

cannot be reassign x

wronged: x = 10; (will throw an error try to assign value to constant variable)

7 0
2 years ago
Class secretType { public: static int count; static int z; secretType(); secretType(int a); void print(); static void incrementY
ANEK [815]

Answer:

a. secretType mySecret(9)

Explanation:

6 0
3 years ago
Your corporation hosts a Web site at the static public IP address 92.110.30.123.
ladessa [460]

Answer:

Check the explanation

Explanation:

In line with the question, we can now derive that:

The router's outside interface IP address will be 92.110.30.65.

The router's inside interface IP address will be 192.168.11.254.

The Web site's IP public IP address will be 92.110.30.123.

The private IP address of the backup Web server will be 192.168.11.110.

and when we say IP address, it stands for Internet Protocol, it is a set of usual predefined rules which are utilized to administrate the manner to which data packets are sent over the internet. An IP address, which is typically just identified as an IP, is a sequence of figures used to uniquely recognize a computer/device on a particular network or on the internet space.

7 0
3 years ago
What is the ratio from the big to the small rectangle? ​
dedylja [7]

Answer:

<em><u>1/4</u></em>

Explanation:

8 0
3 years ago
Other questions:
  • Which of the following questions will most likely be answered by displaying data on a line graph?
    14·1 answer
  • Synthesizing information can be done by creating
    15·2 answers
  • Which computer device is used to capture or copy a photograph to place in a report?
    14·1 answer
  • Each of the following programs has errors. Find as many as you can. 65. // Find the error in this program. #include using namesp
    5·1 answer
  • Given four inputs: a, b, c &amp; d, where (a, b) represents a 2-bit unsigned binary number X; and (c, d) represents a 2-bit unsi
    6·1 answer
  • What security principle does a firewall implement with traffic when it does not have a rule that explicitly defines an action fo
    13·1 answer
  • Using the world_x database you installed in Module 1, list the countries and the capitals of each country. Modify your query to
    11·1 answer
  • BOTH QUESTIONS ONLY FILL IN C++ CODEWrite a copy constructor for CarCounter that assigns origCarCounter.carCount to the construc
    12·1 answer
  • A. Get a value for x from the user.
    13·1 answer
  • If you need assistance or have questions related to your sevis record, i-20, admission, or course registration which phone numbe
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!