Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Help pls. Find the first 10 consecutive numbers after the decimal point in e and pi which sum is the prime number
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Find the first 10 consecutive numbers after the decimal point in e and pi which sum is the prime number
isprime() checks if number is prime
3 comentarios
David Hill
el 13 de Oct. de 2022
Here is some help. Floating point is only good to about 15 digits. Use symbolic if you need pi to more digits.
a=movsum(num2str(floor((pi-3)*10^14))-'0',10,'Endpoints','discard')
isprime(a)
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!