0 LIKES LikeUnLike
This is a Java program I wrote. All it is supposed to do is add a and b. Then it displays the total. But instead of displaying the total, it displays the word "total" Why. I will be giving 10 points if you tell me how to do that too.import java.util.Scanner;class Add { public static void main(String args[]){ Scanner myScanner = new Scanner(System.in); double a; double b; double total; System.out.print("a= "); a = myScanner.nextDouble(); System.out.print("b= "); b = myScanner.nextDouble(); System.out.println("total"); total = a + b; }}
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 8 answers.