<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>https://www.glc.us.es/~jalonso/SLEAM2010/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cvillegas</id>
	<title>Software Libre para la Enseñanza y el Aprendizaje de las Matemáticas (2010-11) - Contribuciones del usuario [es]</title>
	<link rel="self" type="application/atom+xml" href="https://www.glc.us.es/~jalonso/SLEAM2010/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cvillegas"/>
	<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/SLEAM2010/index.php/Especial:Contribuciones/Cvillegas"/>
	<updated>2026-07-19T22:35:11Z</updated>
	<subtitle>Contribuciones del usuario</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://www.glc.us.es/~jalonso/SLEAM2010/index.php?title=2010_Ejercicio_20:_Encontrar_la_suma_de_los_d%C3%ADgitos_del_n%C3%BAmero_100!&amp;diff=543</id>
		<title>2010 Ejercicio 20: Encontrar la suma de los dígitos del número 100!</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/SLEAM2010/index.php?title=2010_Ejercicio_20:_Encontrar_la_suma_de_los_d%C3%ADgitos_del_n%C3%BAmero_100!&amp;diff=543"/>
		<updated>2010-05-18T16:45:14Z</updated>

		<summary type="html">&lt;p&gt;Cvillegas: /* Solución 2 (en Groovy) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Enunciado ==&lt;br /&gt;
Encontrar la suma de los dígitos del número 100!&lt;br /&gt;
&lt;br /&gt;
== Solución 1 (en wxMaxima 0.8.5) ==&lt;br /&gt;
&lt;br /&gt;
Solución: 648&lt;br /&gt;
&lt;br /&gt;
 num:100!$&lt;br /&gt;
 resultado:0$&lt;br /&gt;
 while (num)&amp;gt;0 do&lt;br /&gt;
 (resultado:resultado+mod(num,10),&lt;br /&gt;
 num:floor(num/10))$&lt;br /&gt;
 print(resultado);&lt;br /&gt;
&lt;br /&gt;
== Solución 2 (en Groovy) ==&lt;br /&gt;
Para resolver este problema he usado el lenguaje de programación Groovy. Podemos probar el script en la página http://groovyconsole.appspot.com/ &lt;br /&gt;
&lt;br /&gt;
Solución: 648&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
println(sumarDigitos(factorial(100)));&lt;br /&gt;
&lt;br /&gt;
def factorial(BigInteger n){&lt;br /&gt;
    BigInteger resultado = BigInteger.ONE;&lt;br /&gt;
 &lt;br /&gt;
    for (int i=1; i&amp;lt;=n; i++) {&lt;br /&gt;
        resultado = resultado.multiply(BigInteger.valueOf(i));&lt;br /&gt;
    }&lt;br /&gt;
    return resultado&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
def sumarDigitos(BigInteger n){&lt;br /&gt;
    def cadenaDigitos = n.toString();&lt;br /&gt;
    def arrayDigitos = []&lt;br /&gt;
 &lt;br /&gt;
    cadenaDigitos.each{ i -&amp;gt;&lt;br /&gt;
        arrayDigitos.add( i.toBigInteger() )&lt;br /&gt;
    }&lt;br /&gt;
    return arrayDigitos.sum()&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Cvillegas</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/SLEAM2010/index.php?title=2010_Ejercicio_20:_Encontrar_la_suma_de_los_d%C3%ADgitos_del_n%C3%BAmero_100!&amp;diff=542</id>
		<title>2010 Ejercicio 20: Encontrar la suma de los dígitos del número 100!</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/SLEAM2010/index.php?title=2010_Ejercicio_20:_Encontrar_la_suma_de_los_d%C3%ADgitos_del_n%C3%BAmero_100!&amp;diff=542"/>
		<updated>2010-05-18T16:44:22Z</updated>

		<summary type="html">&lt;p&gt;Cvillegas: /* Solución 2 (en Groovy) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Enunciado ==&lt;br /&gt;
Encontrar la suma de los dígitos del número 100!&lt;br /&gt;
&lt;br /&gt;
== Solución 1 (en wxMaxima 0.8.5) ==&lt;br /&gt;
&lt;br /&gt;
Solución: 648&lt;br /&gt;
&lt;br /&gt;
 num:100!$&lt;br /&gt;
 resultado:0$&lt;br /&gt;
 while (num)&amp;gt;0 do&lt;br /&gt;
 (resultado:resultado+mod(num,10),&lt;br /&gt;
 num:floor(num/10))$&lt;br /&gt;
 print(resultado);&lt;br /&gt;
&lt;br /&gt;
== Solución 2 (en Groovy) ==&lt;br /&gt;
Para resolver este problema he usado el lenguaje de programación Groovy. Podemos probar el script en la página http://groovyconsole.appspot.com/ &lt;br /&gt;
&lt;br /&gt;
Solución: 648&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
println(sumarDigitos(factorial(100)))&lt;br /&gt;
&lt;br /&gt;
def factorial(BigInteger n){&lt;br /&gt;
    BigInteger resultado = BigInteger.ONE;&lt;br /&gt;
 &lt;br /&gt;
    for (int i=1; i&amp;lt;=n; i++) {&lt;br /&gt;
        resultado = resultado.multiply(BigInteger.valueOf(i));&lt;br /&gt;
    }&lt;br /&gt;
    return resultado&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
def sumarDigitos(BigInteger n){&lt;br /&gt;
    def cadenaDigitos = n.toString();&lt;br /&gt;
    def arrayDigitos = []&lt;br /&gt;
 &lt;br /&gt;
    cadenaDigitos.each{ i -&amp;gt;&lt;br /&gt;
        arrayDigitos.add( i.toBigInteger() )&lt;br /&gt;
    }&lt;br /&gt;
    return arrayDigitos.sum()&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Cvillegas</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/SLEAM2010/index.php?title=2010_Ejercicio_20:_Encontrar_la_suma_de_los_d%C3%ADgitos_del_n%C3%BAmero_100!&amp;diff=541</id>
		<title>2010 Ejercicio 20: Encontrar la suma de los dígitos del número 100!</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/SLEAM2010/index.php?title=2010_Ejercicio_20:_Encontrar_la_suma_de_los_d%C3%ADgitos_del_n%C3%BAmero_100!&amp;diff=541"/>
		<updated>2010-05-18T16:43:44Z</updated>

		<summary type="html">&lt;p&gt;Cvillegas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Enunciado ==&lt;br /&gt;
Encontrar la suma de los dígitos del número 100!&lt;br /&gt;
&lt;br /&gt;
== Solución 1 (en wxMaxima 0.8.5) ==&lt;br /&gt;
&lt;br /&gt;
Solución: 648&lt;br /&gt;
&lt;br /&gt;
 num:100!$&lt;br /&gt;
 resultado:0$&lt;br /&gt;
 while (num)&amp;gt;0 do&lt;br /&gt;
 (resultado:resultado+mod(num,10),&lt;br /&gt;
 num:floor(num/10))$&lt;br /&gt;
 print(resultado);&lt;br /&gt;
&lt;br /&gt;
== Solución 2 (en Groovy) ==&lt;br /&gt;
Para resolver este problema he usado el lenguaje de programación Groovy. Podemos probar el script en la página http://groovyconsole.appspot.com/ &lt;br /&gt;
&lt;br /&gt;
Solución: 648&lt;br /&gt;
&lt;br /&gt;
//Suma de los dígitos &lt;br /&gt;
println(sumarDigitos(factorial(100)))&lt;br /&gt;
&lt;br /&gt;
def factorial(BigInteger n){&lt;br /&gt;
    BigInteger resultado = BigInteger.ONE;&lt;br /&gt;
 &lt;br /&gt;
    for (int i=1; i&amp;lt;=n; i++) {&lt;br /&gt;
        resultado = resultado.multiply(BigInteger.valueOf(i));&lt;br /&gt;
    }&lt;br /&gt;
    return resultado&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
def sumarDigitos(BigInteger n){&lt;br /&gt;
    def cadenaDigitos = n.toString();&lt;br /&gt;
    def arrayDigitos = []&lt;br /&gt;
 &lt;br /&gt;
    cadenaDigitos.each{ i -&amp;gt;&lt;br /&gt;
        arrayDigitos.add( i.toBigInteger() )&lt;br /&gt;
    }&lt;br /&gt;
    return arrayDigitos.sum()&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Cvillegas</name></author>
		
	</entry>
</feed>