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
You are hired by a game design company and one of their most popular games is The Journey. The game has a ton of quests, and for
Kamila [148]

Answer:

Explanation:

Let's describe the connected part for the very first time.

Component with good connections:-

A semi in any graph 'G' is defined by a way to align element if this can be crossed from the beginning of any link in that pixel or if this can be stated that there is a path across each organized node pair within this subgram.

Consecrated pair means (ni, nj) and (nj, ni) that 2 different pairs would be regarded.

In point a:

We're going to be using contradictions for this segment. They start with the assumption that two lucky journeys are not even in the same strongly interconnected component.

For instance, qi and qj are providing special quests that were not in the very strongly linked element and which implies that, if we start to cross from qi or qi, then qj cannot be approached if we begin to move through qj and as we established if qi or qj is fortunate contests, we may reach any other hunts. Which implies qj from qi or conversely should be reachable. Or we might claim that qi is part of the strongly linked portion of qj or vice versa with this situation.

Consequently, we would not be capable of forming part of a different and strongly linked element for two successful scientists; they must have the same strongly related to the element.

In point b:

Its definition of its strong, line segment indicates that all other searches within such a strongly coordinate system can be made possible from any quest. Because if all quests are accessible from any quest then a lucky search is named, and all other quests can be accessed from any quest in a very coordinated system. So, all contests are fortunate contests in a strongly connected element.

Algorithm:

Build 'n' size range named 'visited' wherein 'n' is the number of graphic nodes that keep records of nodes already frequented.  Running DFS out of every unknown vertex or mark all edges as seen.  The lucky search will be the last unexplored peak.

Psuedo-Code:

Requires this functionality to also be called Solution, it requires 2 reasons as an input, V is a set of objects in graph 'G' and 'G' is a chart itself.

Solution(V, G):

visited[V] = {false}//assign value

for v: 0 to 'V'-1:  //using for loop

if not visited[v]:  //use if block

DFS(v, visited, V, G)  //use DFS method

ans = v //holding value

return ans //return value

3 0
3 years ago
Read 2 more answers
You arrive at school on Friday for a field trip ! What a lucky day!You need to figure out what room you are in before leaving. Y
Pachacha [2.7K]

Answer:

u would look for the roster that has the first letter of your last name

4 0
2 years ago
Read 2 more answers
What is the decimal number 75 in binary and hexadecimal?
hammer [34]

Answer:

00110111 00110101-Binary

3735-Hex

8 0
3 years ago
What is the key to satisfaction and success when choosing a career
ELEN [110]

Answer:

be yourself

Explanation:

3 0
3 years ago
Read 2 more answers
What is gland? mention it's type​
stealth61 [152]

Answer:

Gland is an organ that makes one or more substances, such as hormones, digestive juices, sweat, tears, saliva, or milk.

TYPES OF GLANDS :

ENDOCRINE glands release the substances directly into the bloodstream.

EXOCRINE glands release the substances into a duct or opening to the inside or outside of the body.

BRAINLIEST PLEASE

5 0
2 years ago
Read 2 more answers
Other questions:
  • Gina's teacher has sent her a Word document that contains the names of all the students who are participating in the
    11·2 answers
  • How do you change the slide layout?
    6·2 answers
  • How is the cia triad used to evaluate encryption methods?
    6·1 answer
  • The pay of an hourly worker is calculated by multiplying the hours worked by the hourly rate—up to 40 hours; any hours worked be
    11·1 answer
  • A tech class question any help will be greatly apprieciated
    10·1 answer
  • Help a brotha out..................
    10·1 answer
  • Create a Python program that computes the cost of carpeting a room. Your program should prompt the user for the width and length
    10·1 answer
  • On a Windows system, which Task Manager tab would you use to adjust the priority given to a specific program
    13·1 answer
  • Which word describes an important characteristic of good computer
    6·1 answer
  • Think about all the different ways you communicate with other people throughout your day. • What makes this communication succes
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!