Well… this mastery is about input and output, for this points this is reaaaalllyyy easy so, I will leave a code with an example:
—————–
#include <iostream>
using namespace std;
int x ;
float doublemoney (float x) {
return x + x ;
}
int main () {
float x;
cout <<“Enter the money you want to double: “;
cin>> x;
int y= doublemoney(x) ;
cout <<“Here is the new value for your money: “<< y << endl;
return 0;
}
—————–
cin>> is when the user will enter something
cout << is when you write something and it will show to the user.
#mastery10
Mastery 10! by boshe189 is licensed under a Creative Commons Attribution 4.0 International License.