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
alukav5142 [94]
3 years ago
12

Write a java program to input two double type numbers and by using suitable mathematical functions print the maximum and minimum

numbers out of the two numbers.
java \: me \: likhna \: ok

​
Computers and Technology
1 answer:
ANTONII [103]3 years ago
3 0

Answer:

The program in Java is as follows:

import java.util.Scanner;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 double n1, n2;

 n1 = input.nextDouble();

 n2 = input.nextDouble();

 double Max = Math.max(n1,n2);

 double Min = Math.min(n1,n2);

 System.out.println("Max: "+Max);

 System.out.println("Min: "+Min); }}

Explanation:

This declares the numbers

 double n1, n2;

This gets input for n1

 n1 = input.nextDouble();

This gets input for n2

 n2 = input.nextDouble();

This gets the max of both using the max function

 double Max = Math.max(n1,n2);

This gets the min of both using the min function

 double Min = Math.min(n1,n2);

This prints the max

 System.out.println("Max: "+Max);

This prints the min

 System.out.println("Min: "+Min);

You might be interested in
What features do you think that a smart fridge should have? Please give me a quick answer! And in detail.
Lina20 [59]
A smart fridge should have a variety of functions. The most important function of a smart fridge and the main incentive to purchase one is the ability to see the food in your fridge at a glance. This refrigerator should be programmed to recognize barcodes and keep track of the stock of certain items. Also, there should be other feature such as the ability to see calendars, create grocery lists, have it read recipes out loud, and more. A feature that should be added is more software protection to defend against hackers, and overall optimization to reduce the price.
7 0
3 years ago
_____ uses computer-generated, three-dimensional images to create the illusion of interaction in a real-world environment.
mr_godi [17]

Answer:

"Virtual reality" is the appropriate answer.

Explanation:

The utilization of technological advances gives the impression of a 3D interactive environment wherein the things that have such a perception of space embodiment or involvement, are considered as Virtual reality.

Virtual reality implementations often include:

  • Entertainment,
  • Medical and
  • Educational activities.
3 0
3 years ago
Which security procedure is being demonstrated if an administrator is using Wireshark to watch for specific inbound and outbound
defon

Answer:

The correct answer to the following question will be Option C (Firewall monitoring).

Explanation:

Firewall monitoring would be the analysis of essential firewall parameters that play a key role throughout the effective operation of firewalls.

Usually, management of the firewalls should include:

  • Monitoring the firewall file.
  • Management of the firewall statute.
  • Monitoring the design of the firewall.

Firewall security control is shown if the user uses Wire-shark to track relevant incoming and outgoing traffic.

Therefore, Option C is the right answer.

4 0
3 years ago
Which of the following people was a member of FFA?
strojnjashka [21]

Answer: Tim McGraw

Explanation:

The National FFA Organization is a youth organization that originally aimed to encourage the youth to venture into agriculture by offering agriculture education to youth in high schools and middle schools. In recent years they started offering education in other areas such as business and technology.

The FFA is quite famous and has had and still has a lot of members. It is of no surprise therefore that some of their alumni are now stars. Famous Country musician Tim McGraw is one such alumni and he was a member of the FFA in his hometown of Start, Louisiana.

Other stars who were part of the FFA include; Taylor Swift and Sterling Martin.

8 0
4 years ago
Phases of systems development life cycle do developers identify the particular features nd functions of a new system
ki77a [65]

The phase where developers identify the particular features and functions of a new system is the requirement and analysis stage.

<h3>What is system development?</h3>

System development is the process of defining, designing, testing, and implementing a new software application or program.

System development has a life cycle. The primary stages are as follows;

  • Planning stage
  • Requirement and Analysis
  • Design
  • Development
  • Testing
  • Implementation.
  • Operation and maintenance.

Therefore, the phase where developers identify the particular features and functions of a new system is the requirement and analysis stage.

learn more on system development here: brainly.com/question/13042526

#SPJ12

7 0
2 years ago
Read 2 more answers
Other questions:
  • Paragraph: Read the following two e-mail messages. In three to five sentences, explain why E-mail B is the more appropriate work
    5·1 answer
  • A customer has contacted you to help him alleviate the large amount of time and effort that goes into adding and removing users
    12·1 answer
  • Eric is working on a computer that has a device driver error. Eric can find the name of the device driver however the actual dev
    8·1 answer
  • Why does the phrase "compatibility mode” appear when opening a workbook?
    6·2 answers
  • An IT company revises its process parameters in response to complaints from vendors that products were not ready on time. This w
    15·1 answer
  • What is a relationship between a object and a class?
    7·1 answer
  • The formula =B2/A2 is inserted into cell C2. Which of the following is true when this formula is copied and pasted into cell C3?
    6·1 answer
  • What is the purpose of the green flag in the Scratch interface?
    8·2 answers
  • Choose the correct term to complete the sentence.
    12·1 answer
  • The traditional role of a manager is that of a(n):__________ a. encoder. b. sensegiver. c. communication champion. d. informatio
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!