Can't get this code here to work tried everything I can think of and looked at the FAQ. Should add up multiple variables.Code:#include <iostream>
int main(void)
{
int sum = 0, value;
while (std::cin >> value)
sum += value;
std::cout << "Sum is: " << sum << std::endl;
std::cin.get();
std::cin.ignore();
return 0;
}