Assuming that max() is a function or a macro that takes two arguments .....

Code:

for(x=1;x<=day;x++){
age=99*****(log((max(x,hieght)+a)/7);
}

One thing to watch is that log() is a math function which takes a double as argument. If all of your variables are of integral type you would need to convert something to double to allow it to work. For example;

[code]

Code:

/* provide an macro that implements max() for discussions sake */
#define max(a,b) ((a)<(b) ? (b) : (a))
int x, age, hieght, a;
for(x=1;x<=day;x++){
age=(int)(99*(log((max(x,hieght)+(double)a)/7));
}