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
What is a shortcut for adding a timeline marker
Ludmilka [50]

Answer:

To add a marker to a clip in the Timeline, do the following:

Set up a keyboard shortcut for Add Clip Marker in Edit > Keyboard Shortcuts (Windows), or Premiere Pro > Keyboard Shortcuts (Mac OS).

Select the clip.

Place the Playhead where you want to place the marker.

Press the keyboard shortcut you created for Add Clip Marker.

Explanation:

hope this helps!

5 0
2 years ago
Read 2 more answers
What justification can you give for normalizing a database if the database will be updated only by the people who can be trusted
kakasveta [241]

Answer: C) Both a and b

Explanation:

 The main benefit of normalizing the database as it reduced the redundant data and due the lack of the redundant data, it saves lots of space in the database.

It also improve the update time in the database so it is easy to handle the database security in the system.

It is also has ability to store the dangling tuples so it can easily store all the information of the customer without introduce any inconsistencies in the database system.

Therefore, Option (C) is correct.

 

3 0
3 years ago
How do you use loops in code?
Keith_Richards [23]

Answer:

A loop in a computer program is an instruction that repeats until a specified condition is reached. In a loop structure, the loop asks a question. If the answer requires action, it is executed. ... A computer programmer who needs to use the same lines of code many times in a program can use a loop to save time

Explanation:

4 0
3 years ago
A mule deer can run 1/4 mile in 25 seconds. Which of the following correctly shows this rate as miles per hour?
sashaice [31]
You would do 1/4 * 2.4, since 25 goes into 60 2.4 times so the answer would be 60 mph
8 1
3 years ago
What will you see on the next line?<br><br> int(200.9123)
Mkey [24]

Answer:

200

Explanation:

Because int number can not carry decimal point.

6 0
3 years ago
Other questions:
  • Write a balanced half-reaction for the oxidation of manganese ion Mn+2 to permanganate ion MnO−4 in acidic aqueous solution. Be
    12·1 answer
  • "what are two elements found in an email address?"
    7·1 answer
  • A computer professional who has access to sensitive information shares this information with a third party. Which professional c
    9·2 answers
  • If the user enters 26 what is output? _____________
    15·1 answer
  • _________ cards contain a chip that can store a large amount of information as well as on a magnetic stripe for backward compati
    12·1 answer
  • A computer "nibble" consists of four "bits," each bit being either a 0 or a 1. If characters are represented using a code that u
    12·1 answer
  • Ten output devices you know
    10·1 answer
  • A(an)_______is built-in preset calculation. <br>formula <br> function <br>equation <br>AutoSum​
    12·1 answer
  • What is mean by computer ?where it is used?​
    6·1 answer
  • What does an arrow after a command indicate
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!