problem with C program

Hi. I try to create program that will display equal characters ("=") one by one in interval of 1 second. This is my code:
Code:
#include <stdio.h>
#include <unistd.h>

int main() {
int x;
for (x=0;x<15;x++) {
                     printf("=");
                     sleep(1);
                                     }
return 0;
                 }
Problem is that when I comiple and run this program, I wait 15 seconds, and then suddenly all 15 characters appear at once. That is not effect I want. It should be one by one.

Something interesting is that it works when the line with printf is done like this: (thanks to taz_one)
Code:
printf("=\n");

help me :D
 
Back
Top