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
True or false An electronic form uses input fields in which the user can enter data from their own computer and then transmit t
miskamm [114]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

An electronic form uses input fields in which the user can enter data from their own computer and then transmit the form back to the company - (True)

Yes, it is true, because an electronic form that contains input fields which is used to collect data from the user. The input fields in the electronic form are based on the requirement of the organization about what they want to collect from their user.

For example, when you signup on google account, google company wants to know about your authentication. So the user enters the data in input fields such as first name, last name, phone number etc. When the user clicks on the submit or signup button, all these input values are then transmitted back to the company (google).

7 0
3 years ago
Which Python expression results in 49?<br><br> 7 * 2<br><br> 7^2<br><br> 7 // 2<br><br> 7 ** 2
Juliette [100K]

Answer:

7^2

Explanation:

7^2 is the same as 7*7

7 0
3 years ago
Read 2 more answers
When computers connect to one another to share information, but are not dependent on each other to work, they are connected thro
Andrej [43]
Peer-to-peer would be my best bet. Hope this helps. 
3 0
3 years ago
Read 2 more answers
An update anomaly can occur if A. an instance of the same data is stored in two or more places in the database. B. a data elemen
zalisa [80]

Answer:

A. an instance of the same data is stored in two or more places in the database.

Explanation:

Giving that Update Anomalies usually occur when the designated user person in keeping records or record master stored a particular data in more than one in a database. This is what is called duplication of data and is termed an irregularity on the part of the record keeper.

Hence, the correct answer to the question is " A. an instance of the same data is stored in two or more places in the database."

5 0
3 years ago
What term is used to describe a chipset developed and promoted by the U.S. government from 1993 to 1996 as an encryption device
Flauer [41]

Answer:

Clipper Chip Kerberos National Information Infrastructure (NII)

Explanation:

The Clipper chip was developed by the NSA (National Security Agency) for enciphering and deciphering messages. It was promoted for voice transmission in telecommunications companies. The Clipper chip was announced in 1993, not all consumers and manufacturers embraced it and only last to 1996.

3 0
3 years ago
Other questions:
  • How can people make sure they are using credit cards responsibly
    14·2 answers
  • What short (two letters!) but powerful boolean operator can check whether or not one string can be found in another string?
    12·1 answer
  • Which is the correct process for attaching a file?
    12·1 answer
  • Vghfthcnbvhghvngjgjvjgkb, kcnjc cnnfjdhd mc Dan Jfhjc cm. Cm n n hdjfjocnkcnd
    10·2 answers
  • Suppose the fixed width of an aside element in a fixed layout is 300 pixels, and the fixed width of its parent element (body) is
    15·1 answer
  • When a bank account pays compound interest, it pays interest not only on the principal amount that was deposited into the accoun
    10·1 answer
  • Create the logic for a program that prompts a user for 12 numbers and stores them in an array. Pass the array to a method that r
    8·1 answer
  • Explain the main components of a computer system​
    12·1 answer
  • Create a mobile app plan using PowerPoint slides to show mock-ups of screens,
    6·1 answer
  • What is the descriptor for a filter that warns or blocks you from potentially fraudulent or suspicious websites?.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!