Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

c++ / intf1

.doc
Скачиваний:
107
Добавлен:
02.04.2015
Размер:
19.97 Кб
Скачать

int f1(int m);

int main(int argc, char* argv[])

{

int a=1; int b=10;

cout<<a<<endl;

a=f1(b);

cout<<a<<endl;

cout<<b<<endl;

a=f1(b+5);

cout<<a<<endl;

cout<<b<<endl;

getch();

return 0;

}

int f1(int m)

{

return ++m;

}

int f1(int &m ,int c);

int main(int argc, char* argv[])

{

int a=1; int b=10;

cout<<a<<endl;

a=f1(b,5);

cout<<a<<endl;

cout<<b<<endl;

a=f1(b,15);

cout<<a<<endl;

cout<<b<<endl;

getch();

return 0;

}

int f1(int &m,int c)

{

return m+=c;

}

Соседние файлы в папке c++