Advertisement
tchenkov

L07u01_Numbers1toNWithStep3

Feb 21st, 2017
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. package Uprajneniq;
  2.  
  3. import java.util.Scanner;
  4.  
  5. /**
  6.  * Created by todor on 20.02.2017 г..
  7.  */
  8. public class u01_Numbers1toNWithStep3 {
  9.     public static void main(String[] args) {
  10.         Scanner scan = new Scanner(System.in);
  11.         int n = Integer.parseInt(scan.nextLine());
  12.         for (int i = 1; i <= n; i+=3) {
  13.             System.out.println(i);
  14.         }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement