Mr_Devil Posted November 1, 2006 at 02:57 PM Report Share #61413 Posted November 1, 2006 at 02:57 PM Pessoal, preciso da vossa ajuda.Tenho um exercício para fazer que é o seguinte: desenvolver uma função que construa uma tabela de tabuadassss organizada segundo dois eixos X-Y. O aspecto é o seguinte: 5 6 7 8 9 10 11 12 5 25 30 35 40 45 50 55 60 6 30 36 42 48 54 60 66 72 7 8 9 10 11 12 Não escrevi tudo pq assim já dá para ver a ideia... Se me pudessem ajudar era muito bom... 😛 Fiquem bem... Link to comment Share on other sites More sharing options...
Rui Carlos Posted November 1, 2006 at 03:05 PM Report Share #61415 Posted November 1, 2006 at 03:05 PM qual é a dificuldade? um ciclo dentro de outro, não? coloca aqui o código que já fizeste que depois o pessoal vai-te ajudando... Rui Carlos Gonçalves Link to comment Share on other sites More sharing options...
brink@ero Posted November 1, 2006 at 03:35 PM Report Share #61419 Posted November 1, 2006 at 03:35 PM benvindo ao fórum Mr_Devil Se queres que alguem ajude tens de ser mais claro e mais específico. Qual é o problema ou dificuldade? É saber o tipo de variáveis (vectores, matrizes...) para definir a tabela? O algoritmo para o cálculo? (isto depende um pouco do tipo de variáveis que escolhes para trabalhar) O ouput da tabela para a consola? ... Bem, como podes ver, eu pelo menos não estou no teu contexto, por isso, não percebi a questão. Outra coisa, como disse bem o Rui Carlos: coloca aqui o código que já fizeste que depois o pessoal vai-te ajudando... Não esperes que o pessoal faça tudo 🙂 Cumpr. bk@ero 😛 Link to comment Share on other sites More sharing options...
Mr_Devil Posted November 1, 2006 at 03:52 PM Author Report Share #61425 Posted November 1, 2006 at 03:52 PM É assim, apenas tenho que fazer uma função que use apenas os ciclos. Precisava de ajuda na parte do algoritmo pq depois a fazer o código eu faço na boa.... Fiquem bem Link to comment Share on other sites More sharing options...
Rui Carlos Posted November 1, 2006 at 04:02 PM Report Share #61426 Posted November 1, 2006 at 04:02 PM para i de 1 até 10 para j de 1 até 10 tabuada[i,j] = i*j o algoritmo deve ser algo parecido com isto... Rui Carlos Gonçalves Link to comment Share on other sites More sharing options...
Cypher Posted November 1, 2006 at 04:16 PM Report Share #61430 Posted November 1, 2006 at 04:16 PM n basta fazer onde tu tens 1 até 10 de 5 até 12... Link to comment Share on other sites More sharing options...
Triton Posted November 1, 2006 at 07:54 PM Report Share #61491 Posted November 1, 2006 at 07:54 PM n basta fazer onde tu tens 1 até 10 de 5 até 12... Depende dos valores que queres obter... 😛 <3 life Link to comment Share on other sites More sharing options...
Cypher Posted November 1, 2006 at 08:16 PM Report Share #61494 Posted November 1, 2006 at 08:16 PM exacto! mas tirei dai a logica pois o Mr_devil tem 5 6 7 8 9 10 11 12 5 25 30 35 40 45 50 55 60 6 30 36 42 48 54 60 66 72 7 8 9 10 11 12 a começar no 5 Link to comment Share on other sites More sharing options...
Hipnoted Posted November 1, 2006 at 08:39 PM Report Share #61499 Posted November 1, 2006 at 08:39 PM Eu que saiba a tabuada vai de 1 a 10... 😛 A resposta do Rui Carlos está certa, tens de usar 2 ciclos for e depois imprimir os números. 🙂 "Nunca discutas com um idiota. Eles arrastam-te até ao seu nível e depois ganham-te em experiência" Link to comment Share on other sites More sharing options...
Cypher Posted November 1, 2006 at 09:19 PM Report Share #61517 Posted November 1, 2006 at 09:19 PM Exacto mas eu tava me a referir a começar os dois em 5 e terminar em 12 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now