Proceso SumaPrimerosNPares Definir N, suma Como Entero Escribir "Ingrese el valor de N:" Leer N suma = SumaPares(N, 0) Escribir "La suma de los ", N, " primeros números pares es: ", suma FinProceso Funcion SumaPares(N, suma) Como Entero Si N = 0 Entonces Retornar suma Sino Retornar SumaPares(N-1, suma + (N * 2 - 2)) FinSi FinFuncion
sr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2016 University of Dundee & Open Microscopy Environment. # All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License,