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
Rebooting the computer is a good troubleshooting technique.<br><br> True<br> False
Basile [38]
True it could help.....
6 0
3 years ago
Read 2 more answers
Why When I change my pfp It be blurry and it be ugly- if you know what I mean :c
Mandarinka [93]

Answer:

ong  ik what you mean i  hate that shii

Explanation:

5 0
3 years ago
Read 2 more answers
Which of the following database object hold data?
Oksi-84 [34.3K]

Answer:

tables

Explanation:

In Access, all data is stored in tables, which puts tables at the heart of any database. You might already know that tables are organized into vertical columns and horizontal rows. In Access, rows and columns are referred to as records and fields

4 0
3 years ago
Read 2 more answers
What is a geotag?
Angelina_Jolie [31]

Answer:

It helps to give the geographic location of photos.

Explanation:

A geotag is added into the photography information when it's taken.  That info is part of the EXIF information of a photo that lists a bunch of data related to the photo, like the camera brand, model, the aperture, the speed, the ISO, and so on.

That's assuming the GPS info is available of course, but if it's taken by a phone, it has the GPS info.  Most mid-range and upper-range cameras have it too.

That information is used for example by Google Maps to present photos taken at a specific location.

6 0
3 years ago
Torque is defined as _____.
BlackZzzverrR [31]
<span>something that produces or tends to produce torsion or rotation; the moment of a force or system of forces tending to cause rotation.

</span>
5 0
3 years ago
Other questions:
  • An organization's contact information includes its _____.
    9·2 answers
  • Ar count = 10;
    13·1 answer
  • The person who can give a short defination of subroutine will get the brainliest.
    9·1 answer
  • Identify the electronic community that is a social-networking site.
    5·2 answers
  • Riya wants to save her project work in an external device so that she can show it to her class teacher. Help her to choose the d
    13·2 answers
  • True or False? Using your traffic analytics report, you can see the source of traffic to your website
    13·1 answer
  • Anyone has any ideas for a gaming setup i can buy for christmas. Something with high framing rates (monitor included) for about
    15·1 answer
  • 9. "मेरे तो गिरधर गोपाल, दूसरो ना कोई
    5·1 answer
  • 7 steps in infographic design​
    6·1 answer
  • Write a function named swapFrontBack that takes as input a vector of integers. The function should swap the first element in the
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!