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
Dennis_Churaev [7]
3 years ago
6

Rewrite the following loops, using the enhanced for an array of floating-point numbers. Write your code within comments

Engineering
1 answer:
dmitriy555 [2]3 years ago
4 0

Answer:

Explanation:poop

You might be interested in
Java Programming: Loops and Conditionals
velikii [3]

Answer:

  1. import java.util.Scanner;
  2. import java.util.Random;
  3. public class Main {
  4.    public static void main(String[] args) {
  5.        Scanner input = new Scanner(System.in);
  6.        Random rand = new Random();
  7.        System.out.print("Enter number of questions you wish to practice: ");
  8.        int n = input.nextInt();
  9.        int i = 1;
  10.        while(i <= n){
  11.            int num1 = 1 + rand.nextInt(10);
  12.            int num2 = 1 + rand.nextInt(10);
  13.            int answer = num1 * num2;
  14.            System.out.print("Question " + i + ": " + num1 + " x " + num2 + " = ");
  15.            int response = input.nextInt();
  16.            if(response == answer){
  17.                System.out.println("Correct answer!");
  18.            }
  19.            else{
  20.                System.out.println("Wrong answer. It should be " + answer);
  21.            }
  22.            i++;
  23.        }
  24.    }
  25. }

Explanation:

Firstly, we import Scanner and Random classes (Line 1-2) as we need to get user input for number of questions and generate random number in each question.

Next, create a Scanner and Random object (Line 7-8).  Prompt user to input number of question and get the input using the Scanner object (Line 10-11).

Next create a while loop and set the condition to loop for n number of times (based on number of questions) (Line 14). In the loop, use Random object nextInt method to generate two integers between 1 -10 (Line 15-16). Prompt user to input an answer using the Scanner object (Line 18-19). If the response is matched with answer print a correct message (Line 21-22) other wise inform user they write a wrong answer and show the correct answer (Line 24-25).

8 0
4 years ago
(a) A 10.0-mm-diameter Brinell hardness indenter produced an indentation 2.3 mm in diameter in a steel alloy when a load of 1000
vampirchik [111]

Answer:

(a)  We are asked to compute the Brinell hardness for the given indentation. for HB, where P= 1000 kg, d= 2.3 mm, and D= 10 mm.  

Thus, the Brinell hardness is computed as

HB=2P/\pi D{D-\sqrt{D^2-d^2}

=2*1000hg/\pi (10mm)[10mm-\sqrt{(1000^2-(2.3mm)^2} ]

(b)    This  part  of  the  problem  calls  for  us  to  determine  the  indentation diameter d which  will  yield  a  270  HB  when P=  500  kg.  

d=\sqrt{D^2-[D-\frac{2P}{(HB)\pi D} } ]^2\\=\sqrt{(10mm)^2-[10mm-\frac{2*500}{450( \pi10mm)} } ]^2

6 0
4 years ago
For the reactions of ketone body metabolism, _______.
Artemon [7]

Answer:

Is

Explanation:

7 0
3 years ago
In some states, repair shops can accept used oil from do-it-yourselfers or ____________.
MrMuchimi

Answer:

C. Homeowners

Explanation:

I just took my automotive pollution prevention certification and passed by answering homeowners for this question.

7 0
3 years ago
How is an orthographic drawing similar to or different from an isometric drawing?
evablogger [386]
An isometrical drawing is a nearly 3d drawing showing the object's width and depth in a complete image, from each curved plane of the orthhographic view, the viewpoint is at a 45 degree angle. From an observations point of view, isometric differs, since all longitudes are true.
4 0
3 years ago
Read 2 more answers
Other questions:
  • Four race cars are traveling on a 2.5-mile tri-oval track. The four cars are traveling at constant speeds of 195 mi/h, 190 mi/h,
    15·1 answer
  • A 1200-W iron is left on the iron board with its base exposed to ambient air at 26°C. The base plate of the iron has a thickness
    10·1 answer
  • At the end of a power distribution system, a certain feeder supplies three distribution transformer, each one supplying a group
    8·1 answer
  • If the specific surface energy for magnesium oxide is 1.0 J/m2 and its modulus of elasticity is (225 GPa), compute the critical
    7·1 answer
  • The pads are 200mm long, 150 mm wide and thickness equal to 12mm. 1- Determine the average shear strain in the rubber if the for
    10·1 answer
  • You have 6 resistors in a circuit. The voltage on each is given. Use MATLAB to calculate the total power dissipated by the resis
    13·2 answers
  • What invention would you argue most impacted mechanical engineering
    11·1 answer
  • Define chart name the different types of charts explain any three types of charts
    8·1 answer
  • Water flows through a converging pipe at a mass flow rate of 25 kg/s. If the inside diameter of the pipes sections are 7.0 cm an
    13·1 answer
  • Technicians are normally paid in all of the following methods except:
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!