Jump to content

Multiplicação de dígitos de números


Recommended Posts


Dado um número inteiro, determine o produto dos seus dígitos. 


número = 34262 

resultado = 288 (3*4*2*6*2)


Alguém me consegue ajudar por favor?

Link to comment
Share on other sites


Esse é um problema clássico para ser resolvido com divisão inteira (div) e resto da divisão (mod). Exemplo:

42 div 10 = 4
42 mod 10 = 2


Knowledge is free!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.