Write My Paper Button

WhatsApp Widget

// 2. Practice debugging this program. It has approximately 22 compiler errors, 1 logic error and…

Homework Help Question & Answers

// 2. Practice debugging this program. It has approximately 22 compiler errors, 1 logic error and…

// 2. Practice debugging this program. It has approximately 22 compiler

errors, 1 logic error and

//1 usability error. Identify them all.

import java.util.scanner;

//This program finds the average of three input values.

public class Arithmeticx

{

public static void main( String [] args )

// declare variables

double number1, number2, number3;

// input data

scanner in = newscanner( );

System.out.print( “Number 1? ” );

System.out.print( “Number 2? ” );

System.out.print( “Number 3? ” );

number 1 = in.nextDouble;

number 2 = in.nextDouble;

number 3 = in.nextDouble;

// calculate average

average = num1 + num2 + num3 / 3;

// print results

system.out.print( Number1 + “, ” + Number2 + ” & ” + Number3 );

system.out.println( ” averages to ” + average );

0 0
Add a comment
Don`t copy text!
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
???? Hi, how can I help?