This WSQ was about using the WSQ3 made before but changing it, now using functions for making each calculation.
As I didn´t know how to make functions on c++ I search for it and foun this page that helped my doing this program. (Here).
For each of the operations I needed to use:
int TheOperation (int x, int y)
{int a;
a = x (-/*%) y;
return a; }
And just at the end instead of using:
cout <<“The difference of these two numbers is: “<<resta; I just added the two numbers. Ex: cout <<“The difference of these two numbers is: “<<resta (number1,number2);
This was made for all the operations.
You can see my program here: funtions. Feel free for using it.
This are some pictures of my program:
Haga click para ver el pase de diapositivas.
Using functions by martikaglez is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.