Jump to content
Sign in to follow this  
tonymen

multiplos de 3

Recommended Posts

tonymen

queria que me ajudassem a fazer um programa no qual apareça os multiplos de 3 acabado em 3, 100 vezes

Share this post


Link to post
Share on other sites
KTachyon

Podes explicar melhor?

Múltiplos de 3 acabados em 3 é simplesmente fazer um algoritmo que some 30 ao número 3:

3 + 30n


“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.”

-- Tony Hoare

Share this post


Link to post
Share on other sites
tonymen

tem que aparecer os mutiplos de tres e todos os numeros tem de acabar em 3

Share this post


Link to post
Share on other sites
pmg

Uma implementação da ideia do KTachyon é imprimir normalmente os múltiplos de 3 com o extra de acrescentar um 3: 33, 63, 93, 123, 153, ...


What have you tried?

Não respondo a dúvidas por PM

A minha bola de cristal está para compor; deve ficar pronta para a semana.

Torna os teus tópicos mais atractivos e legíveis usando a tag CODE para colorir o código!

Share this post


Link to post
Share on other sites
KTachyon

Ou seja, todos os múltiplos de 3: 3*N

E números terminados em 3: (3 + 30*M + 10) e (3 + 30*M + 20)

D(N) => [1, +oo[

D(M) => [0, +oo[


“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.”

-- Tony Hoare

Share this post


Link to post
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
Sign in to follow this  

×
×
  • 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.