Taking x amout of reads from analog pin in contitional statement

I am taking temperature readings from an lm-34 and would like to take at least 15 readings before an if statement executes.
Is there any way to that like this..

If (temp>90.. for x amount of times)

    else

thanks

and would like to take at least 15 readings before an if statement executes.

That would involve a for loop, not an if statement.

PaulS, thank you for your relpy

my code has this structure

If (temp>95)
else if (temp>90 && temp<95)
else if (temp>80&&temp<90)
else if(temp<80)

I would simply like to have a hysteresis or something of that nature in case there are abrupt changes in temperature.
If possible it would be nice to put that in the if() or else if() conditional part.

Can you have code like this?

if (x>a for())

SteveTron:
Can you have code like this?

if (x>a for())

No. Stop trying to integrate for loops and if statements. Either do readings and averaging in a for loop before the if statement or use something like a running average. Alternatively, you can use millis() to keep track of HOW long it has held its value and only perform an action if it's been a certain amount of time.

Arrch:
Either do readings and averaging in a for loop before the if statement or use something like a running average. Alternatively, you can use millis() to keep track of HOW long it has held its value and only perform an action if it's been a certain amount of time.

I agree. I think you need to think more carefully about the problem you are trying to solve.

I don't think the temperature reading for an LM34 can change quickly (in Arduino terms) even if the temperature in the space it is measuring changes quickly. I would expect the physical characteristics of the LM34 to provide a lot of averaging without any effort on your part.

...R