New to Java.
Does anyone know how I can print the following output:
The sum of the digits is 3 + 0 + 4 + 5 + 8 = 20
This is my print line:
System.out.print("The sum of the digits is: " + num1 + num2 + num3 + num4 + num5 + sum);
I want to get the +
sign to display, but for some reason I get errors.
Any assistance is appreciated.