question with sum of numbers program

I need help displaying the numbers that are being added. For example if i input 5 it will add 5+4+3+2+1=15, but it will only display 15. I dont know how to get the numbers that are being added to show.

#include <iostream>
#include <string>
using namespace std;

int main()
{
int sum = 0;
int number;

cout << "Please enter a positive number: ";
cin >> number;

while ( number <= 0 )
{
cout << "ERROR: You must enter a positive number! " << endl;
cin >> number; //input number again
}

for (int i = 0; i <= number; i++)

{
sum += number;
i++;
}

cout << sum << endl;

return 0;
}
What values will the variable 'i' inside the for-loop take?
Topic archived. No new replies allowed.