Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
313 B
11
Indexable
Never
public class main {
	static void prnt(int num){
		System.out.println(num);
	}

	public static void main(String[] args){
		int usr_input = 10;
		for(int i=2;i<=usr_input;i++){
			int cnt=0;
			for(int j =2;j<=Math.sqrt(i);j++){
				if(i%j==0){
					cnt++;
				}
			}
			if(cnt==0)prnt(i);
		}
	}
}