Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package FirstTelerikPractice;
- import java.util.Scanner;
- public class threeRealNumbers {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int num1 = Integer.parseInt(scanner.nextLine());
- int num2 = Integer.parseInt(scanner.nextLine());
- int num3 = Integer.parseInt(scanner.nextLine());
- int sum = num1 + num2 + num3;
- if (sum > 0)
- if (num1 > 0 || num2 > 0 || num3 > 0){
- System.out.println("+");
- } else if (num1 < 0 || num2 < 0 || num3 < 0) {
- System.out.println("-");
- } else if (sum == '0') {
- System.out.println("0");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement