So i've been working on this program that looks like a finger print scanner (it's for a murder mystery I'm doing at a party- it's a long story). Anyway, I have this little tidbit of code that i wrote that is supposed to say "Acquiring Fingerprint" and then put dots (".") after it. There is supposed to be a small pause in between each ".", and when i wrote it, and got the pause time right, it simply waits the time that it would take to print all 10 "."s and then prints the entire line at once. Help? I'm using xcode to compile.
#include <iostream>
#include <math.h>
using namespace std;
int main () {
int n;
int p;
int q;
p = 1;
cout << "Acquiring Fingerprint";
while (p < 11) {
n = 1;
while (n < 10000) {
q = 2;
while (q < n) {
if (p % q == 0) {
q = q;
}
q++;
}
n++;
}
p++;
cout << ".";
}
return 0;
}
#include <iostream>
#include <math.h>
using namespace std;
int main () {
int n;
int p;
int q;
p = 1;
cout << "Acquiring Fingerprint";
while (p < 11) {
n = 1;
while (n < 10000) {
q = 2;
while (q < n) {
if (p % q == 0) {
q = q;
}
q++;
}
n++;
}
p++;
cout << ".";
}
return 0;
}