how i get from user in Serial number and after a string or char?

i need send to func a char and number to turn on a.c by heat/cold and temp number
like (heat,28)
and the a.c is turn on heat on 28
i try to get a number and char but is get only the number
help =\

void setup() {
        Serial.begin(9600);     
}

void loop()
{
AC();
}



void AC()
{
  int x;
  
  Serial.println("Type a temp (18-30) into the box above,");


  while(true)  
  {

    while (Serial.available() > 0)
    {

      x = Serial.parseInt();

      x = constrain(x, 18, 30);
      

      Serial.print("Setting temp to ");
      Serial.println(x);


      Serial.print("Input char : ");
      char c=Serial.read();
      
      Serial.print("the char is : ");
      Serial.println(c);
      
    }
  }
}

You may try func('h', 28) where 'h' is just a single a char that your func() will interpret as meaning "heat". If you want to pass a string, as in func("heat", 28) you'll have to use strcmp() to check the value of the string.

tnx for answer ,
i try to get a char and int , look at the code, the int is good but after i want to get a char is skip the command

I see. Well that happens because

     Serial.print("Input char : "); // there is not enough time from print() to read()
     char c=Serial.read();          // so serial.read() will get -1

You may change into:

     Serial.print("Input char : "); 
     while (!Serial.available()) {}  // do nothing until there is a character to read()
     char c=Serial.read();

tnx !!