How do I get the output in the following format?

Basically I have an Integer which stores the values from pot... And I want to print this serially in the format H123E

where 123 will be the value from pot.. Say if my integer 'pos' stores that value from pot.. I want it in the format HposE which should print H(some value)E in the serial monitor I tried the following but H the value and E are printed on different lines

 Serial.println("H");
  Serial.println(pot);
  Serial.println("E");

Perhaps you should look at the Serial.print() and Serial.println() documentation.

In particular, this note on the println page:

Prints data to the serial port as human-readable ASCII text followed by a carriage return character (ASCII 13, or '\r') and a newline character (ASCII 10, or '\n'). This command takes the same forms as Serial.print().

Also, note that the Serial.print() function does not allow you to format the data being sent. If pos contains the value 120, the output sill be '1', '2', and '0'. If pos contains the value 89, the output will be '8' and '9', NOT '0', '8', '9'.

If you need exactly 3 digits, you will need to look into sprintf.

PaulS:
Perhaps you should look at the Serial.print() and Serial.println() documentation.

In particular, this note on the println page:

Prints data to the serial port as human-readable ASCII text followed by a carriage return character (ASCII 13, or ‘\r’) and a newline character (ASCII 10, or ‘\n’). This command takes the same forms as Serial.print().

Also, note that the Serial.print() function does not allow you to format the data being sent. If pos contains the value 120, the output sill be ‘1’, ‘2’, and ‘0’. If pos contains the value 89, the output will be ‘8’ and ‘9’, NOT ‘0’, ‘8’, ‘9’.

If you need exactly 3 digits, you will need to look into sprintf.

Or make a zero with "if pos <100 print 0