Untitled

mail@pastecode.io avatar
unknown
c_cpp
17 days ago
625 B
0
Indexable
Never
#include <iostream>

void zer( int wart, int& ref )
{
    std::cout   << "\tW funkcji zer przed zerowaniem \n"
                << "\twart = " << wart << ", ref = " << ref << std::endl;

    wart = 0;
    ref = 0;

    std::cout   << "\tW funkcji zer po zerowaniem \n"
                << "\twart = " << wart << ", ref = " << ref << std::endl;
}

int main()
{
    int a = 44;
    int b = 77;

    std::cout << "Przed wywowalniem funkcji zer a = " << a << ", b = " << b << std::endl;
    zer( a, b );
    std::cout << "Po wywolaniu funkcji zer a = " << a << ", b = " << b << std::endl;

    return 0;
}
Leave a Comment