We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Java
- Introduction
- Java If-Else
- Discussions
Java If-Else
Java If-Else
Sort by
recency
|
2022 Discussions
|
Please Login in order to post a comment
public class Solution { private static final Scanner scanner = new Scanner(System.in);
}
Otra de las soluciones es: import java.io.; import java.math.; import java.security.; import java.text.; import java.util.; import java.util.concurrent.; import java.util.regex.*;
public class Solution {
}
**import java.util.Scanner; public class Solution{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); if(n%2!=0) System.out.println("Weird"); else if(n>=2 && n<=5) System.out.println("Not Weird"); else if(n>= 6&& n<=20) System.out.println("Weird"); else System.out.println("Not Weird"); sc.close(); } } **
Java is a powerful and versatile programming language that's been a backbone of software development for decades. betguru 247 net login