On windows is there anyway to make the emacs shell behave correctly with printf.

I have used eshell, shell, cmd, and powershell. None of them gets the
behaviour right. If I use the windows dos command prompt then
everything works as expected. For example.
 This basic c script.

# include <stdio.h>
int main()
{
  float a,b,c,interest;
  printf("Type in amount in dollars cents:\n");
  scanf("%f",&a);
  b = 0.075;
  c = a * b;
  interest = a + c;
  printf("The total including interest is $%.2f", interest);
    return 0;
}

The printf follows the action incorrectly instead of printing to the
screen and awaiting input.
c:\MyC>sum.exe
sum.exe
22
Type in amount in dollars cents:
The total including interest is $23.65
c:\MyC>

Is there anyway to fix this behaviour?

Reply via email to