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
lyudmila [28]
2 years ago
15

Output values below an amount Write a program that first gets a list of integers from input. The input begins with an integer in

dicating the number of integers that follow. Then, get the last value from the input, which indicates a threshold. Output all integers less than or equal to that last threshold value. Assume that the list will always contain fewer than 20 integers. java
Computers and Technology
1 answer:
Katarina [22]2 years ago
6 0

The program that first gets a list of integers from input, gets the last value from the input, which indicates a threshold, and outputs all integers less than or equal to that last threshold value is:

import java.util.Scanner;

public class LabProgram {

 /* Define your methods here */

public static void main(String[] args) {

Scanner scnr = new Scanner(System.in);

int[] userValues = new int[20];

int upperThreshold;

int numVals;

numVals = scnr.nextInt();

GetUserValues(userValues, numVals, scnr);

upperThreshold = scnr.nextInt();

OutputIntsLessThanOrEqualToThreshold(userValues, numVals, upperThreshold);

}

}

Read more about java programming here:

brainly.com/question/26952414

#SPJ1

You might be interested in
What unit is used to describe the smallest amount of bitcoin?
diamong [38]

Answer:

The satoshi is currently the smallest unit of the bitcoin currency recorded on the block chain. It is a one hundred millionth of a single bitcoin (0.00000001 BTC).

Explanation:

A bitcoin is a type of digital currency in which a record of transactions is kept and new units of currency are generated by the computational solution of mathematical problems. Bitcoins operate independently through a central bank.

7 0
3 years ago
Consider the following statements: struct supplierType { string name; int supplierID; }; struct paintType { supplierType supplie
Romashka [77]

Answer:

The answer is "supplierType"

Explanation:

Description of the code:

  • In the given program two structure is defined, that is "supplierType and paintType", in which "supplierType" structure two-variable name and "supplierID" is defined, that datatype is "String and integer".
  • In the next step, "paintType" is declared, in which "supplierType" object supplier is created, in which two string variable "color and paintID" are defined, in which "supplierType" data type is supplied.
3 0
3 years ago
Amye is in high school. As part of one of her classes, she had to identify the legality of different situations that involved
adell [148]
I say you should pick answer 1. an HR makes more sense since she is interested in a topic about the legality of different situations that are related to workers and their employers.
8 0
3 years ago
Read 2 more answers
a. Write a function called fizzbuzz. This function will take 1 number as a parameter. The function will print all numbers from 0
OLga [1]

Answer:

def fizzbuzz (num):

 for item in range(num):

   if item % 2 == 0 and item % 3 == 0:

     print("fizzbuzz")

   elif item % 3 == 0:

     print("buzz")

   elif item % 2 == 0:

     print("fizz")  

   else:

     print (item)

fizzbuzz(20)

Explanation:

Using Python programming Language

Use a for  loop to iterate from 0 up to the number using the range function

Within the for loop use the modulo (%) operator to determine divisibility by 2 and 3 and print the required output

see attached program output screen.

5 0
3 years ago
Consider sending a 2400-byte datagram into a link that has an mtu of 700 bytes. suppose the original datagram is stamped with th
Feliz [49]

Explanation:

Let, DG is the datagram so, DG= 2400.

Let, FV is the Value of Fragment and F is the Flag and FO is the Fragmentation Offset.

Let, M is the MTU so, M=700.

Let, IP is the IP header so, IP= 20.

Let, id is the identification number so, id=422

Required numbers of the fragment = [\frac{DG-IP}{M-IP} ]

Insert values in the formula = [\frac{2400-20}{700-20} ]

Then,        = [\frac{2380}{680} ] = [3.5]

The generated numbers of the fragment is 4

  • If FV = 1 then, bytes in data field of DG= 720-20 = 680 and id=422 and FO=0 and F=1.
  • If FV = 2 then, bytes in data field of DG= 720-20 = 680 and id=422 and FO=85(85*8=680 bytes) and F=1.
  • If FV = 3 then, bytes in data field of DG= 720-20 = 680 and id=422 and FO=170(170*8=1360 bytes) and F=1.
  • If FV = 4 then, bytes in data field of DG= 2380-3(680) = 340 and id=422 and FO=255(255*8=2040 bytes) and F=0.

3 0
3 years ago
Other questions:
  • What branch of science helps avoid or minimize stress-related injuries at workplace?
    6·1 answer
  • When using a template to compose a memorandum which key on the keyboard moves the cursor to the next field
    15·1 answer
  • The Zapper gun was an accessory for which game console?
    8·2 answers
  • What is the keyboard shortcut used to paste previously copied text?
    15·2 answers
  • Which of the following systems is designed with full-time monitoring tools that search for patterns in network traffic to identi
    6·1 answer
  • Which types of file formats are the best choice for files that may need to be edited later?
    14·1 answer
  • when demonstrating 2022 altima’s parking assistance, what steering feature should you mention when pointing out how easy the veh
    10·1 answer
  • In object-oriented analysis, an object is a member of a(n) _____, which is a collection of similar objects.
    11·1 answer
  • On a leading-trailing system technician A says that both shoes do equal work when stopping while going in reverse. Technician B
    11·1 answer
  • What causes the hidden node problem in a wireless local area network (wlan)?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!