Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class czterdziescitrzy {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- System.out.println("Podaj ilość liczb pierwszych: ");
- int n = sc.nextInt();
- int liczbaP=1;
- for (int i=0; i<=n; i++){
- if (liczbaP % 1 == 0 && liczbaP % liczbaP == 0);
- {
- System.out.print(", " +liczbaP);}
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement