Skip to content

sarsika/java-program

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

java-program

To find a negative number or positive number in java program

//Brute force class Main { public static void main (String[]args) {

int num = 5;

//Conditions to check if the number is negative or positive
if (num > 0)
    System.out.println ("The number is positive");
else if (num < 0)
    System.out.println ("The number is negative");
else
    System.out.println ("Zero");

} }

About

To find a negative number or positive number in java program

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors