Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MultiplicationSign {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- double num1 = Double.parseDouble(sc.nextLine());
- double num2 = Double.parseDouble(sc.nextLine());
- double num3 = Double.parseDouble(sc.nextLine());
- double product = num1 * num2 * num3;
- if (product > 0) {
- System.out.println("+");
- }else if (product == 0) {
- System.out.println(0);
- }else System.out.println("-");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement