I am trying to ditch my global variables but i can't work out how to send a variable between functions...

eg.

The program runs but gives an answer of x = 0.Code:int main(float x) { calculate(); printf("x = %f",x); return 0; } int calculate() { float x; x=2+2; }

What am i doing wrong?

Thanks,

Jez