/**************************************************************************** * endowment.c * * Computer Science 50 * David J. Malan * * Simulates Harvard's endowment. * * Demonstrates \r, fflush, and sleep. ***************************************************************************/ #include #include int main(int argc, char *argv[]) { // simulate progress from 0% to 100% for (long long l = 36900000000; l >= 26000000000; l--) { printf("\rEndowment: $%lld", l); fflush(stdout); } printf("\n"); }