prompt user for input and display character in every line
hi im having problems printing "->" on the beginning of each line, im trying to do it as a loop and ending it when the user types "q". also i would like to know how to ignore text from the user when the input begings with a specific character. heres what ive done so far, and not currrently working as expected.
Code:
#include <stdio.h>
int main (void)
{
char prompt;
printf("~~~ FRACTION CALCULATOR ~~~\n");
printf(">");
prompt; getchar();
while (prompt !='q')
{
printf(">");
}
return 0;