Advertisement
Guest User

asdf

a guest
Oct 31st, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. import java.util.*;
  2. public class Z341 {
  3.     public static void main(String[] args) {
  4.         Scanner in = new Scanner(System.in);
  5.         int a,i,diff=1;
  6.        
  7.         System.out.print("Podaj wartosc naturalna: ");
  8.         a = in.nextInt();
  9.        
  10.         System.out.print("Ciag arytmetyczny o roznicy 3: "+diff);
  11.         for(i=0; i<=a; i++){
  12.             diff+=3;
  13.             System.out.print(", "+diff);
  14.         }
  15.         System.out.print(".");
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement