We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1249152 + f40f490 commit 17b8dafCopy full SHA for 17b8daf
2 files changed
Basic Codes/Positive_Negative.java
@@ -0,0 +1,15 @@
1
+import java.util.*;
2
+public class Positive_Negative {
3
+ public static void main(String args[]){
4
+ Scanner sc=new Scanner(System.in);
5
+ System.out.println("Enter any number");
6
+ int n=sc.nextInt();
7
+ if(n>=0){
8
+ System.out.println("Positive");
9
+ }
10
+ else {
11
+ System.out.println("Negative");
12
+
13
14
15
+}
Basic Codes/multiple_of_two.java
@@ -1,14 +1,10 @@
class multiple_of_two {
-public static void main(String args[])
-{
-int a = 2;
-if(a%2==0)
-System.out.print("Multiple of two");
-}
-else
-System.out.print("Not multiple of two ");
+ public static void main(String args[]) {
+ int a = 2;
+ if (a % 2 == 0) {
+ System.out.print("Multiple of two");
+ } else {
+ System.out.print("Not multiple of two ");
}
0 commit comments