0
How to write a function that takes user input(a number) and show its sum with 10,and then call the function?
function with user input
3 ответов
+ 4
void function(int input) {
int added = input + 10;
cout << input << " + 10 = " << added << ends;
}
int main() {
int inputNumber;
cout << "Enter a number to add with 10: ";
cin >> inputNumber;
function(inputNumber);
return 0;
}
Is this what you wanted?
0
wow I can only handle the problem with Java or JavaScript ...do u mind?
0
sry I wanna see it in c++. i'm not good with java yet ...