//zmienne statyczne - ich wartosc o wyjsciu z funkcji zostaje zachowana
//program zlicza ile razy zostala wywolana
#include <iostream.h>
int fun(float s)
{
     static int a;
     static float b;
     return ++a;
     b=b+s;
                        
}
int main()
{
    for(int i=0;i<20;i++)
    {
            float s;
            //static float s=0;
            fun(1/i);
    }
    cout<<
    system("pause");
    return 0;
}
