Sayth Renshaw <flebber.c...@gmail.com> writes: > # include <stdio.h> > int main() > { > float a,b,c,interest; > printf("Type in amount in dollars cents:\n");
fflush(stdout); > scanf("%f",&a); > b = 0.075; > c = a * b; > interest = a + c; > printf("The total including interest is $%.2f", interest); > return 0; > } Windows automatically flushes the output before a scanf if stdout/stdin is a console window, but it does not if they are redirected to another program.