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
Lera25 [3.4K]
4 years ago
13

numbers that the user inputs. You must use JoptionPane to input the three numbers. A first method must be called and used to dev

elop logic to find the smallest of the three numbers. A second method must be used to print out that smallest number found.
Computers and Technology
1 answer:
Inga [223]4 years ago
5 0

Input the three numbers. A first method must be called and used to develop logic to find the smallest of the three numbers. A second method must be used to print out that smallest number found.

Explanation:

  • Input of 3 numbers.
  • Then the numbers are checked to print the smallest one.

import java.util.Scanner;

public class Exercise1 {

public static void main(String[] args)

   {

       Scanner in = new Scanner(System.in);

       System.out.print("Input the first number: ");

       double x = in.nextDouble();

       System.out.print("Input the Second number: ");

       double y = in.nextDouble();

       System.out.print("Input the third number: ");

       double z = in.nextDouble();

       System.out.print("The smallest value is " + smallest(x, y, z)+"\n" );

   }

  public static double smallest(double x, double y, double z)

   {

       return Math.min(Math.min(x, y), z);

   }

}

You might be interested in
Essay:
nirvana33 [79]

Answer:

1) There are three ingredients needed to access the Internet from a laptop or desktop computer: (1) an ISP, (2) a modem and (3) a Web browser.

2) yeah ofcourse social media ia a very helpful tool for people because it helps us connect with people all around the globe.It helps you clear you doubts for the perfect example is now.You know you are clearing your doubt here in brainly which can be considered as a social media.

8 0
3 years ago
recursive function that accepts a stack of integers as a parameter and replaces every even value in the stack with two occurrenc
slega [8]

The solution is to keep all values in the Function Call Stack until the stack is empty. When the stack is empty, place all held items at the bottom of the stack one by one.

What is Recursive Function?

Recursive functions in code frequently rely on loop setups, in which the initial variable is called on multiple times while the loop is changing it. The factorial is a simple example of a recursive function in which an integer is multiplied by itself while being incrementally lowered. Many other self-referencing functions in a loop, for example, where n = n + 1 given an operating range, could be called recursive functions.

In addition to simpler recursive functions, programmers and others have created much more complex functions that also use recursion principles. Some, such as the Fibonacci sequence, have applications in finance and other fields, while others are esoteric and largely restricted to the IT community.

To learn more about Recursive Function, visit: brainly.com/question/28540529

#SPJ4

3 0
2 years ago
Consider this program segment: int newNum = 0, temp; int num = k; // k is some predefined integer value 0 while (num > 10) {
Doss [256]

Answer:

All of these statements are true.

Explanation:

Since the while loop is reversing the integer number and leaving the highest order digit in the num and stores the reversed number in the newNum variable.

It skips one digit so if the num is in the range of [100,1000] it will result in a number between 10 and 100.

This loop can never go in infinite loop for any initial value of num because the loop will run as many times as the number of digits.

and if the value of the num is <=10 the while loop will never run and the value of newNum will be 0.

6 0
4 years ago
Witch is the correct description of the first act in a classical game story structure
3241004551 [841]
Hitler because,Hitler was a great and wealthy companion
4 0
4 years ago
What is the velocity of a 0.100kg car with a momentum of 5 kgm/s?
Cerrena [4.2K]

Answer:

v = 50 m/s

Explanation:

p = mv

5 = 0.1v

v = 50

4 0
3 years ago
Other questions:
  • Which of the following steps in enumeration penetration testing extracts information about encryption and hashing algorithms, au
    13·1 answer
  • This provides an easy method for workers to use their computers.
    5·1 answer
  • After a robbery, what is the purpose of conducting a neighborhood canvass?
    9·1 answer
  • What is the program that searches through data bases?
    10·1 answer
  • What is the primary benefit of using solid state storage
    7·1 answer
  • Select the device that will have the most network ports
    8·1 answer
  • Write a program that reads a list of integers, and outputs those integers in reverse. The input begins with an integer indicatin
    6·1 answer
  • You manage a network that uses switches. In the lobby of your building, there are three RJ45 ports connected to a switch. You wa
    5·1 answer
  • While num_printed != num_stars: print('*') Sample output with input: 3 * * *
    15·1 answer
  • The first version of Windows to have automatic updates from the Internet was _____.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!