So today we did our fourth quiz, which consists on doing two functions, so there it goes. If you need help, there’s my twitter.

## Code:

#include <iostream>

using namespace std;

int minimunThree(int x, int y, int z)

{

if (x<=y && x<=z)

{

return x;

}

else if (y<=x && y<=z)

{

return y;

}

else if (z<=x && z<=y)

{

return z;

}

}

int sumSquares(int x, int y, int z)

{

return (x*x + y*y + z*z);

}

int main ()

{

int a, b, c;

cout<<“This program will tell you which number is the smallest out of three, and the sum of its square.”<<endl;

cout<<endl;

cout<<“Please insert the first number:”<<endl;

cin>>a;

cout<<“Please insert the second number:”<<endl;

cin>>b;

cout<<“Please insert the third number:”<<endl;

cin>>c;

int min= minimunThree(a,b,c);

int sum= sumSquares(a,b,c);

cout<<“The smallest number is: “<<min<<“.”<<endl;

cout<<“The sum of the square of those three numbers is: “<<sum<<“.”<<endl;

return 0;

} //Enrique Olaf GarcĂa Cambero