I wanted to take another crack at it, but being a newb it's hard for me to decipher. I know someone that could do it, if they could find the time, and had the patience ;).
here's my second take.
#include<stdio.h>
includes header file
int f(int x, int y);
this to me looks like the declaration of a function, but I'm not sure. It looks weird because because it doesn't have a body of code to run between curly brackets. Someone with more experience is going to have to touch on that one.
1 2 3 4
|
int x, y, results;
x=3;
y=4;
results=f(x,y);
|
declares variables x,y, and results
it gives x the value of 3, y the value of 4, and results the value of called function f.
x=f(y, result+x);
this gives x the value of called function f after it calculates.
y=f(1, f(results,2) );
this gives y the value of called function f after it calculates with passed arguments 1, f(results,2)
return 0;
this is the functions return value. 0 is usually used for void functions, as far as I know.
}
1 2 3 4
|
int f( int x, int y)
{
return x*x + y*y;
}
|
to me this looks like the declaration of function f.
it returns the value of x times x plus y times y.
the order of precedence is
brackets, exponents, dividing, multiplying, adding, and subtracting.
sense there's only multiplying, and adding. it would multiply first, and then add.
so answer for x time x would be added to the answer of y times y...
what this program does I have no idea...but I can tell you by the looks of it it doesn't do much useful, lol.