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

The following code does not work as intended. It is meant to input two test grades and return the average in decimal format: int

test1 = scan.nextInt(); int test2 = scan.nextInt(); double average = (test1 + test2 )/2; System.out.println("Answer: " + average);
Computers and Technology
1 answer:
yuradex [85]3 years ago
6 0

Answer:

To return average in Decimal we will use float datatype instead of double.

Explanation:

int test1 = scan.nextInt();

int test2 = scan.nextInt();

float average = (test1 + test2 )/2;

System.out.println("Answer: " + average);

You might be interested in
Help Asap! Marking brainliest!✨
gulaghasi [49]

Answer:

The answer would be After the slide you are viewing.

I hope this helped!

8 0
3 years ago
Read 2 more answers
HELP PLEASE!!!! Which type of prototyping is most often associated with the rapid prototyping development method?
Georgia [21]

Answer:

That will be Throwaway

6 0
3 years ago
Fire stick optimizing system storage and applications
vivado [14]

Answer:

IN MY PROFILE

Explanation:

I HAVE AWNSERED THIS QUESTION THROUGHOUT MY BEING HERE PLEASE DO NOT BE AFRAID TO CLICK ON MY PROFILE AND FIND THE ANSWER

5 0
3 years ago
Reusable modules, which are represented in the structure chart as rectangles with vertical lines on both sides, may often appear
Molodets [167]

Answer:

The answer to this question is the option "A".

Explanation:

In this question, the answer is option "A" which is the library. The term library stands in programming language for library made available across implementations of a programming language. In the programming section library is a collection of pre-compiled modules that a program can use and modules are stored in object format. We can reuse these modules in our program. So the answer to this question is the library.

8 0
3 years ago
/*
Lera25 [3.4K]

Answer:

The answer to this question can be given as:

Method:

public static void showTwos(int number)  //method definition.

{

method body.  

System.out.print(number + " = ");  //print number

while (number % 2 == 0)   //condition

{

System.out.print("2 * ");    //print message.

number = number / 2;

}

System.out.println(number);    //print value.

}

Explanation:

In the above method definition firstly, we declare the method showTwos() that name is already given in the question then we pass a variable number as a parameter in the method. In this first, we take input number from the user and pass into this method. In this method we use a while loop it is an entry control loop in this loop first we modules the number if it is equal to 0.Then we divide the number by 2 and in the last, we print the value.

4 0
3 years ago
Other questions:
  • Prewritten, commercially available sets of software programs that eliminate the need for a firm to write its own software progra
    5·1 answer
  • Directory servers from different vendors are synchronized through ________.
    9·1 answer
  • Assuming there are 100 million households in the US, and that each household has two HDTVs, and that each TV is used to watch 4
    15·1 answer
  • How many bytes does a common processor require to represent an integer?
    7·1 answer
  • Why is printer an output device​
    14·2 answers
  • Write a Java class with the following methods: getArray(int numStrings) is an instance method that takes command line input (use
    11·1 answer
  • Write a function called count_occurrences that takes two strings. The second string should only be one character long. The funct
    13·1 answer
  • User defined blocks of code can be created in
    13·1 answer
  • To create a program in Scratch, you need to think systematically about the order of steps. This is known as
    11·1 answer
  • Display the Approval Form worksheet and create an IF statement in cell B13 to determine if the applicant is eligible for a perso
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!