CMPT 212
Fall 1997
|
int times10(int x) { //
return x*10; // function definition.
} //
int main() {
int number;
cin >> number;
cout << times10(number); // function is called here.
return 0;
}
int times10(int); // function prototype
// (function declaration).
int main() {
int number;
cin >> number;
cout << times10(number); // function is called here.
return 0;
}
int times10(int x) { //
return x*10; // function definition.
} //
Return to lecture notes index |
|
This page is maintained by simpson@cs.sfu.ca. | Last updated on 10 Sep 1997. |