Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class number3 {
- public static void main(String[] args) {
- Scanner input = new Scanner (System.in);
- int num;
- System.out.println("Please enter a number: ");
- num = input.nextInt();
- multiple(num);
- }
- public static void multiple(int num) {
- //int multiple;
- if(num % 5 == 0) {
- System.out.println("It is a multiple of 5.");
- }
- else
- System.out.println("It is not a multiple of 5.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement