embedding two codes using if statement

hello, i am trying to connect the following two codes by is statement.

#include // include the LCD library

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int potPin = A0; //Potentiometer input pin

int potValue1 = 0;

int potValue2 = 0; // final display variable

void setup() {

lcd.begin(16, 2); // lcd rows and columns

lcd.print(“Potentiometer”); // title of sorts

}

void loop() {

// read then divide the input(max 1020 in this case) by 10

potValue1 = analogRead(potPin) / 10;

// divide by 1.02 to get percentage

potValue2 = potValue1 / 1.02;

// set cursor to second row, first column

lcd.setCursor(0, 1);

//display final percentage

lcd.print(potValue2);

//print the percent symbol at the end

lcd.print(“%”);

//wait 0.1 seconds

delay(100);

//wipe the extra characters

lcd.print(” “);

delay(1);

}

the next code is

int timesTosend=1;

int count=0;

char phone_no=”87546165xxx”;

void setup()

{

Serial.begin(9600);

delay(2000);

Serial.println(“AT+CMGF=1″);

delay(200);

}

void loop()

{

while(count’);

{

Serial.print(“Test Message From Arduino GSM….HELLO…!!!”);

delay(500);

Serial.write(0x1A);

Serial.write(0x0D);

Serial.write(0x0A);

delay(5000);

}

count++;

}

}

the first code is based on displaying the potentiometer values as percentage in an lcd module

the second code is based on sending message by using gsm module

if the value of lcd read in the first code is 60% then it need to activate the second code