#include <iostream> using namespace std; int isPrimeNumber(int); int main() { bool isPrime; for(int n = 2; n < 100; n++) { // isPrime will be true for prime numbers isPrime = isPrimeNumber(n); if(isPrime == true) cout<<n<<" "; } return 0; } // Function that checks whether n is prime or not int isPrimeNumber(int n) { bool isPrime = true; for(int i = 2; i <= n/2; i++) { if (n%i == 0) { isPrime = false; break; } } return isPrime; }
The answer is D. Only student B is correct. Student A is incorrect because static electricity can be detected through the principle of electrostatic induction, which will indicate if there are static electricity on the surface of an object. A device which can detect static electricity is an electroscope. Moreover, for student B, it is correct that the cause for electric current to flow is the uniform flow of free electrons.