Mastery topic 6 & 7

--Originally published at TC1017 Programing Curse

For those mastery topics i had to create functions to do the proccesses, and in int main just the central code, or ask for the user for the number…

Resultado de imagen para funciones meme

Taken from generadomemes.com http://www.generadormemes.com/meme/5xy2ao

#include <iostream>
using namespace std;

int num1;
int num2;
int suma1;

int funcion1 (int num1)
{
num2=num1;
suma1= num2+num1+10;
return suma1;
}

int main()
{
cout << “Escribe un numero” << endl;
cin >> num1;

suma1 = funcion1 (num1);
cout << “el resultado es: ” << endl;
cout << suma1 << endl;

return 0;
}

masterytopic7-y-6