Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Project: Exam_17_July_2016 - created by borkins on 2017-05-16.
- */
- import java.util.Scanner;
- public class _06_StopNumber
- {
- public static void main(String[] args)
- {
- Scanner console = new Scanner(System.in);
- int n = Integer.parseInt(console.nextLine());
- int m = Integer.parseInt(console.nextLine());
- int s = Integer.parseInt(console.nextLine());
- for (int i = m; i >= n; i--)
- {
- if (i % 2 == 0 && i % 3 == 0) {
- if (i == s) break;
- System.out.print(i + " ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment