#include<stdio.h>
int main()
{ int n=3;
while(n>0)
{ printf("P");
n--;
sleep(1);
}
return 0;
}
With this code 3 P's are appearing at the same time after 3 seconds. But I want it to appear one by one with 1 second time interval. How should I modify it?