expected unqualified-id before error with coding

Hi,

I have written the below code for to turn on LEDs based on temp sensor with an offset dictated by a 10K pot but I keep getting these errors with my coding. Any thoughts as to why?

Thank in advance.

// load LCD library
#include <LiquidCrystal.h>
//Define LCD pins
LiquidCrystal lcd(12,11,5,4,3,2);
int a0, a1;
void setup () {
pinMode(a0, INPUT);
pinMode(a1, INPUT);
pinMode(13, OUTPUT);
pinMode(12,OUTPUT);
pinMode(11, OUTPUT);
Serial.begin(9600);
lcd.begin(16,2);
lcd.print("Temperature:");
}
void loop() {
// Define integers
int rawval;
float scaled_temp, scaled_pot;
// Scale temperature input
rawval = analogRead(a0);
scaled_pot = scale_analogue(rawval,0.5,1.2/125);

// Scale Pot input
rawval = analogRead(a1);
scaled_pot = scale_analogue(rawval,0,1);
delay(5000);
lcd.setCursor(0,0);
lcd.print("TEMPERATURE");}
/*
Function to scale analogue input
scaled value = (raw - offset)/gradient
raw is int between 0 and 1023
offset is float between 0 and 5
gradient = slope of the V vs sensor units from graph
*/
float scale_analogue(int raw, float offset, float gradient)
{
float Scaled_Value, Voltage;
Voltage = float(raw)*5/1024;
Scaled_Value = (Voltage - offset)/gradient;
return(Scaled_Value);}

//Function to Operate LEDs

if (a1<0.073())
{digitalWrite(10,HIGH}
//Blue LED turns on
elseif (a1>0.15())
{digitalWrite(8,HIGH)}
//Red LED turns on
else (a1>0.073&&a1<0.15())
{digitalWrite(9,HIGH)}
// Green LED turns on

46:1: error: expected unqualified-id before 'if'
49:8: error: expected constructor, destructor, or type conversion before '(' token
52:1: error: expected unqualified-id before 'else'.

Regards,

Tezza

if (a1<0.073())

You cannot have a function called 0.073.

elseif (a1>0.15())

Or one called 0.15

And C++ has no "elseif"

{digitalWrite(8,HIGH)}

No semicolon.
All that code at the end is outside any function.

Please remember to use code tags when posting code

digitalWrite(10,HIGH

No ) as well as no ;

And a condition after else

else (a1>0.073&&a1<0.15())