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
1-(50 points) The function sum_n_avgcomputes the sum and the average of three input arguments and relays its results through two
MAXImum [283]

Answer:

The program in C++ is as follows:

#include <iostream>

using namespace std;

double *sum_n_avg(double n1, double n2, double n3);

int main () {

   double n1, n2, n3;

   cout<<"Enter 3 inputs: ";

   cin>>n1>>n2>>n3;

   double *p;

   p = sum_n_avg(n1,n2,n3);

   cout<<"Sum: "<<*(p + 0) << endl;

   cout<<"Average: "<<*(p + 1) << endl;

  return 0;

}

double *sum_n_avg(double n1, double n2, double n3) {

  static double arr[2];

  arr[0] = n1 + n2 + n3;

  arr[1] = arr[0]/3;

  return arr;

}

Explanation:

This defines the function prototype

double *sum_n_avg(double n1, double n2, double n3);

The main begins here

int main () {

This declares variables for input

   double n1, n2, n3;

This prompts the user for 3 inputs

   cout<<"Enter 3 inputs: ";

This gets user inputs

   cin>>n1>>n2>>n3;

This declares a pointer to get the returned values from the function

   double *p;

This passes n1, n2 and n3 to the function and gets the sum and average, in return.

   p = sum_n_avg(n1,n2,n3);

Print sum and average

<em>    cout<<"Sum: "<<*(p + 0) << endl;</em>

<em>    cout<<"Average: "<<*(p + 1) << endl;</em>

  return 0;

}

The function begins here

double *sum_n_avg(double n1, double n2, double n3) {

Declare a static array

  static double arr[2];

Calculate sum

  arr[0] = n1 + n2 + n3;

Calculate average

  arr[1] = arr[0]/3;

Return the array to main

  return arr;

}

5 0
1 year ago
Which Android application is used exclusively for sharing video content?
Sphinxa [80]
I believe the answer is Klip on plato
8 0
1 year ago
Read 2 more answers
Consider a maximal flow problem in which vehicle traffic entering a city is routed among several routes before eventually leavin
ohaa [14]

Answer:

c. the arcs represent one-way streets.

Explanation:

7 0
1 year ago
Mile markers appear as _____ green signs.
german

Answer:

A.Big,Rectangular

Explanation:

mile markers are sign on high ways they are green signs they are big and rectangular shape

6 0
1 year ago
Read 2 more answers
An author is preparing to send their book to a publisher as an email attachment. The file on their computer is 1000 bytes. When
Yakvenalex [24]

Answer:

See explanation

Explanation:

My explanation to the author is that:

The reduction in size of the attachment doesn't mean that some parts of the book (i.e. the attachment) has been deleted.

I'll also made him understand that the book will retain its original size and contents after downloading by the recipient of the mail.

6 0
2 years ago
Other questions:
  • Which of the following word pairs correctly completes the sentence below?
    15·2 answers
  • The memory allocated for a float value is ____ bytes.
    9·1 answer
  • When using preventative insecticides which holiday period should trigger an application?
    15·2 answers
  • JAVAThe method longestStreak is intended to determine the longest substring of consecutive identical characters in the parameter
    7·1 answer
  • How would GIS, GPS, or remote sensing technology be used to evaluate the destruction caused by a tornado in Oklahoma?
    13·1 answer
  • int decode2(int x, int y, int z); is compiled into 32bit x86 assembly code. The body of the code is as follows: NOTE: x at %ebp+
    5·1 answer
  • Section 6.9 of your textbook ("Debugging") lists three possibilities to consider if a function is not working. Describe each pos
    14·1 answer
  • When pasting an object which has been copied from a different slide, where on the slide does the object paste, assuming nothing
    15·1 answer
  • Complete the program below that takes in one positive, odd, integer, n (at least 3), and prints a "diamond" shape of stars with
    9·1 answer
  • there is a structure called employee that holds information like employee code, name, date of joining. Write a program to create
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!