galinyotsev123

ProgBasicsJavaBook7.1ComplexLoop01Numbers1...NwithStep3

Jan 12th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7.  
  8. int n = Integer.parseInt(scanner.nextLine());
  9. for (int i = 1; i <= n; i+=3) {
  10. System.out.println(i);
  11. }
  12.  
  13.  
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment