Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import com.sun.org.apache.xpath.internal.SourceTree;
- import java.util.Scanner;
- public class trainingCodes{
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int number = Integer.parseInt(scanner.next());
- if (number > 0) {
- System.out.println("The number is positive.");
- }else {
- if(number ==0) {
- System.out.println("The number is 0");
- }else{
- System.out.println("the number is negative");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment