Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Пример 5.Функции:
- //аргументы по умолчанию; результат функции?; использование перегруженной main
- #include <iostream>
- using namespace std;
- void print_values(int a = 0, int b = 0, int c = 0) {
- cout << a << " " << b << " " << c << endl;
- }
- int main(int argv, char **argc) {
- int x = 10, y = 20, z = 30;
- print_values(x, y, z);
- print_values(x, y);
- print_values(x);
- print_values();
- cout << endl;
- for (int i = 0; i < argv; ++i) cout << argc[i] << endl;
- return 0;
- }
- /*
- void main() {}
- int main() {
- return 0;
- } */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement