#include <iostream>
usingnamespace std;
int main()
{
int SP = 1; //sets a starting point for the loop
int num1;
cout << "Please enter the number of how many times you want the message to loop" << endl;
cin >> num1;
do
{
cout << SP << endl;
SP=SP+ 1;
}
while (SP <= num1);
cout << "The number of times looped: " + num1 << endl;
}
The + operator will not append num1 to the string. What you need to do is feed the integer into cout separately. Use Moschops line instead of your own line 16.