Skip to content

Commit 7359ec1

Browse files
Changing increment operator
Why use count+=1 , when we have count++ ?
1 parent ee637fe commit 7359ec1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

CheckPrime.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public static void main(String[] args) {
77
x=input.nextInt();
88
for(int i=1;i<=x;i++){
99
if(x%i==0){
10-
count+=1;
10+
count++;
1111
}
1212
}
1313
if(count>2 || count==1){

0 commit comments

Comments
 (0)