This commit is contained in:
HeshamTB 2019-01-17 20:47:22 +03:00
parent c291e7b4b6
commit 79f34ca552

24
src/lab/one/Three.java Normal file
View 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();
}
}
}