C/C
Expert: Zlatko - 9/28/2010
QuestionWrite a program which allows the user to enter characters
until the input is 0.Each time a character is entered, the
program should display whether it is greater or lesser than or
equal to the previous character entered
AnswerHello Aparajita
For ethical reasons, I am not going to write the program for you. I will help you if you show me some effort.
Here is some advice. In your program be sure to include <stdio.h>. Create a main program with a while loop. In the while loop call getc(stdin) to get a character. The getc() is a standard C function. Read about getc at
http://www.cplusplus.com/reference/clibrary/cstdio/getc/
You will need an integer to hold the getc result. You will also need an integer to hold the previous (older) getc result so that you can compare them. I hope that will get you started.
Best regards
Zlatko