Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company.homeworkConditionalStatements;
- import java.util.Scanner;
- public class Problem04_MultiplicationSign {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- double a = scan.nextDouble();
- double b = scan.nextDouble();
- double c = scan.nextDouble();
- double sum = a * b * c;
- if (sum > 0) {
- System.out.println("+");
- } else if (sum < 0) {
- System.out.println("-");
- } else {
- System.out.println("0");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement