I'm trying to write a while loop that displays 15 asterisks one at a time. When I run the program it doesn't terminate after 15 repetitions. Can somebody help me?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <iostream>
usingnamespace std;
int main()
{
int num=1;
{
while(num<=15)
cout<<"*";
num++;
}
system("pause");
}