Q1: USING Java GRASP please DEBUG and type the new code // 1. Practice debugging this program. It has approximately 10 compiler errors. Identify them all. public class Multiplierx { public static void main( String [] args ) { // declare data double firstnum; double secondnum; double product; //input data java.util.Scanner in = new Scanner( System.in ); System.out.print( "Enter first number to multiply: " ); double firstnum = in.nextdouble( ); System.out.print( "Enter second number to multiply: " ); double secondnum = in.nextdouble( ); //calculate result product = 2ndnumber * 1stnumber; //output results System.out.print( firstNum + " * " ); System.out.print( secondNum + " = " ); System.out.println( product ); } }
Q1: USING Java GRASP please DEBUG and type the new code
// 1. Practice debugging this program. It has approximately 10 compiler errors. Identify them all.
public class Multiplierx
{
public static void main( String [] args )
{
// declare data
double firstnum;
double secondnum;
double product;
//input data
java.util.Scanner in = new Scanner( System.in );
System.out.print( "Enter first number to multiply: " );
double firstnum = in.nextdouble( );
System.out.print( "Enter second number to multiply: " );
double secondnum = in.nextdouble( );
//calculate result
product = 2ndnumber * 1stnumber;
//output results
System.out.print( firstNum + " * " );
System.out.print( secondNum + " = " );
System.out.println( product );
}
}
Trending now
This is a popular solution!
Step by step
Solved in 2 steps