Unable to use the getchar() and putchar() inArduino uno

Can the Arduino forum community help me on this program to work for me?
Nothing happens on the LCD display or Serial monitor.
What am I doing wrong?

The program is:-

// This program prints out typed characters in an LCD display

#include <LiquidCrystal.h>
#include <stdio.h>
#include <stdlib.h>

const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

int STORE;
void setup() {
Serial.begin(9600);
// set up the LCD’s number of columns and rows:
lcd.begin(16, 2);
delay(1000);
lcd.print(" getchar() example");
delay(1000);
}

void loop() {
//lcd.clear();
lcd.setCursor(0,0);
delay(500);
while ((STORE = getchar()) != ‘\n’);
Serial.println(STORE);
delay(1000);
lcd.print(STORE);
delay(1000);
}

Your help is greatly appreciated!
Thanks

getchar from where?

Please remember to use code tags when posting code

The ONLY thing that code will EVER print to either device is a '\n'. How are you expecting to see that on an LCD???

Regards, Ray L.

As a partial fix for the problem identified above, remove the semicolon from the end of this line:

while ((STORE = getchar()) != '\n');

Better, but still not great, to write:

while ((STORE = getchar()) != '\n') {
Serial.println(STORE);
}

I'll leave it to you to figure out how to get the character to the LCD.

Are you sure you want to stick your finger in your ear for 2000 milliseconds each time through loop()?

I thank everyone who commented on my poor programming habits, and all those who helped me with constructive solutions.

Greatly appreciated!