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
Which type of photographer documents plants and weather in their natural habitat?
mario62 [17]
B, plants and weather are part pf nature.
7 0
2 years ago
Google is an example of a(n): Web site.search engine.search directory. subject directory
lora16 [44]
Google is famously known as a search engine and it is being used around the globe. Aside from being a search engine, it also offers other services such as productivity software or google docs, e-mail services like Gmail, cloud storage or the google drive and it also offers social networking services through google plus. Google also has some desktop application for free of use such as google chrome, picasa and instant messaging like hangouts. Their mission statement as for being the most used search engine is "to organize the world's information and make it universally accessible and useful".
6 0
4 years ago
Timothy is a multimedia designer. He needs to create a prototype of a new product that his firm is launching. Which multimedia s
mestny [16]

Explanation:

The answer is D. 3-f modeling

5 0
4 years ago
If I could make a Short Film on any topic it would be...how could that film change the world?
tensa zangetsu [6.8K]
Your Decision but a good one will be exploring the ocean or the underground it will be very shocking if you find something no one ever has found.
6 0
3 years ago
9
Natasha_Volkova [10]

Answer:

I'm sorry the answer is really difficult to understand, could you explain?

Explanation:

8 0
3 years ago
Other questions:
  • Web sites use _____ to track users while they are on the site.
    9·1 answer
  • Once a table is inserted into a publication, which two tabs become available?
    5·1 answer
  • What is the TAG to begin a Web page, as recommended by the W3C?
    13·1 answer
  • Help me for this question
    8·1 answer
  • How many of yall are willing too sub to my channel called "Space Juice" with around 200 subs?!​
    6·1 answer
  • 1. What is a digital networking app?
    12·2 answers
  • How to reload ingenuity when a pulsating blue thing is there
    11·1 answer
  • चार फरक छुट्याउनुहोस् ।) 3. Write down any four provisions of cyber ethic साइबर नैतिकताका कुनै चार प्रावधानहरु लेख्नुहोस् ।​
    11·1 answer
  • I try to make an account so I can have some help, but it always says "We’re sorry, but we are not able to complete your registra
    13·1 answer
  • After you set a goal or purpose for your Web site, what is the next step to designing your​ pages​?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!