Help pls. Find the first 10 consecutive numbers after the decimal point in e and pi which sum is the prime number
Informazioni
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Mostra commenti meno recenti
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 Commenti
Matt J
il 13 Ott 2022
Yes. Homework. What have you done and where are you stuck?
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)
Risposte (0)
Questa domanda è chiusa.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!