Write a complete MATLAB program using while loop that will take a number from user as input and display whether the number is a prime or not. Your program should be able to handle invalid inputs.
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Zulfiqar Sakib
el 29 de Nov. de 2020
Comentada: Md. Sajidul Islam Plabon
el 29 de Nov. de 2020
A prime number is defined as a positive integer that is divisible by 1 and that number only. For example: 11 is a prime number as it is divisible by 1 and 11 only
1 comentario
Respuestas (1)
Ameer Hamza
el 29 de Nov. de 2020
0 comentarios
Ver también
Categorías
Más información sobre Discrete Math en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!