// This application displays some math facts public class DebugThree2 { public static void main(String args[]) { int a = 2; int b = 5; int c = 10; add(a, b); add(b, c); subtract(c, a); } public static void add(int
// This application displays some math facts public class DebugThree2 { public static void main(String args[]) { int a = 2; int b = 5; int c = 10; add(a, b); add(b, c); subtract(c, a); } public static void add(int
Question
Find and fix any logic and syntax errors.
// This application displays some math facts
public class DebugThree2
{
public static void main(String args[])
{
int a = 2;
int b = 5;
int c = 10;
add(a, b);
add(b, c);
subtract(c, a);
}
public static void add(int a, b)
{
System.out.println("The sum of " + a +
" and " + a + " is " + (a + b));
}
public static void subtract(int a, b)
{
System.out.println("The difference between +
a + " and " + b + " is " + (a * b));
}
}
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, data-structures-and-algorithms and related others by exploring similar questions and additional content below.