commit cb229f5f45e3eece57ea18284101bb6368b8f70c Author: 250410 <250410@localhost> Date: Tue Nov 18 11:43:07 2025 +0000 commit inicial diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..b5fbbc0 --- /dev/null +++ b/pom.xml @@ -0,0 +1,13 @@ + + + 4.0.0 + com.mycompany + Exercicio13 + 1.0-SNAPSHOT + jar + + UTF-8 + 24 + com.mycompany.exercicio13.Exercicio13 + + \ No newline at end of file diff --git a/src/main/java/com/mycompany/exercicio13/Exercicio13.java b/src/main/java/com/mycompany/exercicio13/Exercicio13.java new file mode 100644 index 0000000..badd283 --- /dev/null +++ b/src/main/java/com/mycompany/exercicio13/Exercicio13.java @@ -0,0 +1,29 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + */ + +package com.mycompany.exercicio13; + +/** + * + * @author 250410 + */ +public class Exercicio13 { + + public static void main(String[] args) { + for(int i = 2 ; 1 <= 1000;i++){ + boolean primo = true; + for(int j = 2; j < i ; j++){ + if(i % j == 0){ + primo = false; + break; + } + } + if(primo){ + System.out.println("i"); + } + + + } + } +}