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
liubo4ka [24]
3 years ago
7

Basic output with variables (Java) This zyLab activity is intended for students to prepare for a larger programming assignment.

Warm up exercises are typically simpler and worth fewer points than a full programming assignment. Warm up exercises are ideally suited for an in-person scheduled lab meeting or as self-practice. The last section provides a full programming assignment. A variable like userNum can store a value like an integer. Extend the given program to print userNum values as indicated. (Submit for 2 points) (1) Output the user's input. Enter integer: 4 You entered: 4 (2) Extend to output the input squared and cubed. Hint: Compute squared as userNum userNum. (Submit for 2 points, so 4 points total). Enter integer: 4 You entered: 4 4 squared is 16 And 4 cubed is 64!! (3) Extend to get a second user input into userNum2. Output sum and product. (Submit for 1 point, so 5 points total). Enter integer: 4 You entered: 4 4 squared is 16 And 4 cubed is 64!! Enter another integer: 5 4 5 is 9 45 is 20 LAB 1.16.1: Basic output with variables (Java) 0/5 ACTIVITY OutputWithVars.java Load default template... 1 import java.util.Scanner; 2 3 public class OutputWithVars public static void main(String [] args) Scanner scnr new Scanner(System. in); int userNum - 0 6 7 System.out.println ("Enter integer: ") userNum scnr. next Int ( ) ; 9 10 return; 11 12 13
Engineering
1 answer:
9966 [12]3 years ago
3 0

Answer:

1

Explanation:

You might be interested in
As described in "A Note About Bacterial Reproduction -- and the "Culture Bias,"" the organism Epulopisciumdoes not divide by bin
zloy xaker [14]

Answer:

A

Explanation:

The best method that will yield significantly more accurate result is to use spectrophotometer to read the turbidity of the sample and increase in turbidity is associated with increase biomass.

5 0
3 years ago
Which is a better hydraulic cross section for an open channel: one with a small or a large hydraulic radius?
Cerrena [4.2K]
Hydraulic radius is caused by pressurized hydrogen air so that should mean the answer is hydraulic radius
6 0
3 years ago
What is the volume of the rectangular prism shown.
Likurg_2 [28]
It would be 72cm bc u need to add up all the line in the back to
7 0
3 years ago
Say you have a random, unordered list containing 4096 four-digit numbers. Describe the most efficient way to: sort the list and
Debora [2.8K]

Answer:

Answer explained below

Explanation:

It is given that numbers are four-digit so maximum value of a number in this list could be 9999.

So we need to sort a list of integers, where each integer lies between [0,9999].

For these given constraints we can use counting sort which will run in linear time i.e. O(n).

--------------------------------------------------------------------------------

Psuedo Code:

countSort(int numList[]) {

int count[10000];

count[i] = 0; for all i;

for(int num in numList){

count[num]+= 1;

}

return count;

}

--------------------------------------------------------------------------------

Searching in this count array will be just O(1).

E.g. Lets say we want to search if 3 was present in the original list.

Case 1: it was present in the original list:

Then the count[3] would have been incremented by our sorting algorithm. so in case element exists then count value of that element will be greater than 0.

Case 2: it was not present:

In this case count[3] will remain at 0. so in case element does not exist then count of that element will be 0.

So to search for an element, say x, we just need to check if count[x]>0.

So search is O(1).

Run times:

Sorting: O(n)

Search: O(1)

6 0
3 years ago
On what frequency can you expect to monitor air traffic in and around<br> Lincoln Airport?
Phantasy [73]

Answer:

118.5

Explanation:

Hope this helps!

5 0
3 years ago
Other questions:
  • Admission to an aquarium is $14 per person. There is also an IMAX theatre in the building, which charges $8 per ticket for a 3D
    8·1 answer
  • You are an engineer at company XYZ, and you are dealing with the need to determine the maximum load you can apply to a set of bo
    13·1 answer
  • Write an application named EnterUppercaseLetters that asks the user to type an uppercase letter from the keyboard. If the charac
    8·1 answer
  • Two metallic terminals protrude from a device. The terminal on the left is the positive reference for a voltage called vx (the o
    9·2 answers
  • Please answwr the above question screenshot.​
    15·1 answer
  • A civil engineer is likely to fit in which of the Holland occupational codes?
    14·2 answers
  • In a movie theater in winter, 510 people, each generation sensible heat at a rate of 80 W, are watching a movie. The heat losses
    11·1 answer
  • g Asbestos is a fibrous silicate mineral with remarkably high tensile strength. But is no longer used because airborne asbestos
    5·1 answer
  • . An ideal vapor compression refrigeration cycle operates with a condenser pressure of 900 kPa. The temperature at the inlet to
    14·1 answer
  • If we didn’t have the spark what could not happen?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!