Three
This commit is contained in:
parent
c291e7b4b6
commit
79f34ca552
24
src/lab/one/Three.java
Normal file
24
src/lab/one/Three.java
Normal file
@ -0,0 +1,24 @@
|
||||
package lab.one;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Three {
|
||||
|
||||
@SuppressWarnings({ "unused", "resource" })
|
||||
public static void main(String[] args) {
|
||||
Scanner sc = new Scanner(System.in);
|
||||
int number;
|
||||
System.out.println("Enter a number: ");
|
||||
try {
|
||||
number = sc.nextInt();
|
||||
if ( number != 7 )
|
||||
System.out.print( "Welcome " );
|
||||
|
||||
if ( ( number % 5 ) == 0 )
|
||||
System.out.println( "To Java Programming" );
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user