answer.
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
Komok [63]
2 years ago
6

Java Programming home > 1.14: zylab training: Interleaved input/output Н zyBooks catalog Try submitting it for grading (click

"Submit mode", then "Submit for grading"). Notice that the test cases fail. The first test case's highlighting indicates that output 3 and newline were not expected. In the second test case, the-5 and newline were not expected 2 Remove the code that echoes the user's input back to the output, and submit again. Now the test cases should all pass 0/2 ACTIVITY 1.14.1: zylab training: Interleaved input/output DoubleNum.java Load default template 1 import java.util.Scanner; 3 public class DoubleNum public static void main(String args) { Scorner sehr = new Scanner(System.in); int x; 7 System.out.println("Enter x: "); 9 - scnr .nextInto: 10 11 System.out.println(); // Student mistakenly is echoing the input to output to match example 12 System.out.println("x doubled is".02 Develop mode Submit mode Run your program as often as you'd like, before submitting for grading. Below, type any needed Input values in the first box, then click Run program and observe the programs cutout in the second be Enter program input (optional) of your code requires input values, provide them here Ad Cat
Computers and Technology
1 answer:
Andru [333]2 years ago
5 0

Answer:

The following are the code to this question:

code:

System.out.println(x);  //use print method to print value.

Explanation:

In the given question, it simplifies or deletes code in the 11th line. This line has a large major statement.  

In the case, the tests fail because only 1 line of output is required by the tester, but two lines are obtained instead.

It's to demonstrate that the input/output or testing requirements function throughout the model.

You might be interested in
rite a method so that the main() code below can be replaced by simpler code that calls method calcMilesTraveled(). Original main
weeeeeb [17]

Complete Question

Write a method so that the main() code below can be replaced by the simpler code that calls method calcMiles() traveled.

Original main():

public class Calcmiles {

public static void main(string [] args) {

double milesperhour = 70.0;

double minutestraveled = 100.0;

double hourstraveled;

double milestraveled;

hourstraveled = minutestraveled / 60.0;

milestraveled = hourstraveled * milesperhour;

System.out.println("miles: " + milestraveled); } }

Answer:

import java.util.Scanner;

public class CalcMiles

{

public double CalculateMiles (double miles, double minutes)

{ //Method CalculateMiles defined above

//Declare required variables.

double hours = 0.0;

double mile = 0.0;

//Calculate the hours travelled and miles travelled.

hours = minutes / 60.0;

mile = hours * miles;

//The total miles travelled in return.

return mile;

}

public static void main(String [] args)

{

double milesPerHour = 70.0;

double minsTravelled = 100.0;

CalculateMiles timetraveles = new CalculateMiles();

System.out.println("Miles: " + timetravels.CalculateMiles(milesPerHour, minsTraveled));

}

}

//End of Program

//Program was written in Java

//Comments are used to explain some lines

Read more on Brainly.com - brainly.com/question/9409412#readmore

7 0
2 years ago
It is an array containing information such as headers, paths and script locations wherein it is created by the web server itself
Naddik [55]

Answer:

c. $_SERVER

Explanation:

$_SERVER is an array in PHP containing information about headers, paths, and script locations.

Example usage:

echo $_SERVER['HTTP_HOST'];

This will print information about HTTP_HOST header.

echo $_SERVER['DOCUMENT_ROOT'];

This provides information about document root path.

echo $_SERVER['SCRIPT_FILENAME'];

This provides information about the currently executing script.

4 0
2 years ago
One form of competition-based pricing is going-rate pricing, inwhich a firm bases its price largely on competitors' prices, with
Kobotan [32]

Answer:

Out of the four options , the option that is most suitable  is

option b. Cost, demand

<u>cost</u> or to <u>demand</u>

Explanation:

Going rate pricing is a form of competition based pricing. This pricing is commonly used for homogeneous products i.e., products with very minute distinction or variation among producers.

This type of pricing is based on setting price on the basis of the prevailing market trends in pricing of goods or services, so, the prices are largely based on the competition in the market rather than considering its own cost and demand.

8 0
2 years ago
What is the argument in this function =AVERAGE(F3:F26)
monitta
The argument for the function would be answer "D".
5 0
2 years ago
When performing actions between your computer and one that is infected with a virus, which of the following offers NO risk of yo
DochEvi [55]
What are the options?
3 0
2 years ago
Read 2 more answers
Other questions:
  • An electronics store purchased a CD player at a wholesale price of $60 and then sold it at a 40 percent discount off the origina
    13·1 answer
  • The spreadsheet below shows the names years in office, and number of terms for five US presidents
    7·2 answers
  • 1.2.2: Output variable value. Jump to level 1 Write a statement that outputs variable userAge. End with a newline. 1 2 3 4 5 6 7
    12·1 answer
  • Refer to the exhibit. The PC is connected to the console port of the switch. All the other connections are made through FastEthe
    6·1 answer
  • 14. Emelia is very concerned about safety and has conducted a study to determine how many bike helmets were replaced at each loc
    13·2 answers
  • Which XP practice prescribes that "the code [always be] written by two programmers at one machine"?.
    13·1 answer
  • Which of these are characteristics of a Python data type? Check all that apply.
    11·1 answer
  • In the next five years there are expected to be over _____ unfilled jobs in the US in computer science.
    10·1 answer
  • Match each scenario to the absolute value expression that describes it. 1. the distance moved when going backwards five spaces i
    13·2 answers
  • Write a function named shout. The function should accept a string argument and display it in uppercase with an exclamation mark
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!