Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void addten(int); //function prototype
- int main(){
- cout << "Program that takes a number and adds 10 using functions. \n\n";
- cout << "Enter a whole number: ";
- int number;
- cin >> number;
- cout << "\n";
- addten(number);
- return 0;
- }
- void addten(int n){
- n = n + 10;
- cout << "Number plus 10: " << n << "\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement