// Enoizat,
// Let me just "refactor" your source code a bit ^_^
#include <iostream>
using namespace std;
int main()
{
int const whatIsThisValue = 4;
int grandTotal = 0;
std::cout << "\nKey a number: Or key any letter to end" << std::endl;
for(auto userInput = 1 + whatIsThisValue; whatIsThisValue < userInput;)
{
std::cout << "Enter a number>";
std::cin >> userInput;
grandTotal += userInput;
}
std::cout << "Grand total is: " << grandTotal << std::endl;
//--
return 0;
}
// Mr. Enoizat I still can not get for loop to work!
// This line are giving me a error > for(auto userInput = 1 + whatIsThisValue; whatIsThisValue < userInput;)
Nobody would not believe I have been trying for (2) days to get this solve and it not solve yet...
It seems you've being struggling with this problem (summing up a bunch of numbers in a loop) since 14/04/2018. Am I wrong? What's the part you find so difficult?