I need help please, how can I write a program to count the number of digits of an integer the user entered ?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Rodha M
el 23 de Sept. de 2020
Respondida: Ameer Hamza
el 23 de Sept. de 2020
For example, I asked the user to input a number and he entered 5984, how can I write a program to count how many digits it has (which is 4)? Thank you.
0 comentarios
Respuesta aceptada
madhan ravi
el 23 de Sept. de 2020
Editada: madhan ravi
el 23 de Sept. de 2020
strlength(abs(5984) + "")
Más respuestas (1)
Ver también
Categorías
Más información sobre Startup and Shutdown 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!