Home > Back-end >  The C language
The C language

Time:06-05

To determine whether primes
Always feel wrong, bigwig flaw

CodePudding user response:

You is this in addition to the two output should be a prime number, in addition to n=2, the else inside n % o (n - 1) is not zero

CodePudding user response:

reference 1st floor qq_45798109 response:
you is this in addition to the two output should be a prime number, in addition to n=2, the else inside n % o (n - 1) is not zero

You try, I tried to do, but want to find out

CodePudding user response:

refer to the second floor baidu_39603834 response:
Quote: refer to 1st floor qq_45798109 response:
you is this in addition to the two output should be a prime number, in addition to n=2, the else inside n % o (n - 1) is not zero

You try, I tried to do, but want to find out loopholes

The cycle as long as you do a is sure to break, inside the else wrong, n is divided by a number is not zero can't mean that he is not a prime number

CodePudding user response:

reference qq_45798109 reply: 3/f
Quote: refer to the second floor baidu_39603834 response:
Quote: refer to 1st floor qq_45798109 response:
you is this in addition to the two output should be a prime number, in addition to n=2, the else inside n % o (n - 1) is not zero

You try, I tried to do, but want to find out loopholes

The cycle as long as you do a is sure to break, inside the else wrong, n is divided by a number is not zero can't mean that he is not a prime

Your computer and try all right, if after the curly braces, fetch more than %

CodePudding user response:

reference 4 floor baidu_39603834 response:
Quote: refer to the third floor qq_45798109 response:
Quote: refer to the second floor baidu_39603834 response:
Quote: reference 1st floor qq_45798109 response:
you is this in addition to the two output should be a prime number, in addition to n=2, the else inside n % o (n - 1) is not zero

You try, I tried to do, but want to find out loopholes

The cycle as long as you do a is sure to break, inside the else wrong, n is divided by a number is not zero can't mean that he is not a prime

Your computer and try all right, if after the curly braces, fetch more than % in accordance with

I'm sorry, my computer is broken yesterday,
Not curly braces problem that circulating the if and the else you will meet a, perform a break, don't have any meaning, can you give a number to calculate your hands

CodePudding user response:

reference 5 floor qq_45798109 reply:
Quote: refer to 4th floor baidu_39603834 response:
Quote: refer to the third floor qq_45798109 response:
Quote: refer to the second floor baidu_39603834 response:
Quote: refer to 1st floor qq_45798109 response:
you is this in addition to the two output should be a prime number, in addition to n=2, the else inside n % o (n - 1) is not zero

You try, I tried to do, but want to find out loopholes

The cycle as long as you do a is sure to break, inside the else wrong, n is divided by a number is not zero can't mean that he is not a prime

Your computer and try all right, if after the curly braces, fetch more than % in accordance with

I'm sorry, my computer is broken yesterday,
Not curly braces problem that circulating the if and the else you will meet a, perform a break, don't have any meaning, you can give a number to calculate your hands

Try your computer,,,,

CodePudding user response:

I tried the code wrong

CodePudding user response:

I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related