if I understand properly you want to decrease the subtrahend by 3 every time and subtract it from your current result. To do that add another variable called subtrahend and initialise by 25. Each round of the loop decrease the subtrahend after you subtracted it from i.
using namespace std;
int subtrahend = 25;
you are only decrementing by one. You seem to want to start yuor decrement at 25, and then subtract the decrement by 3 each time (i.e. subtract 25; subtract 22; subtract 19) as stated by the desired output you wish to recieve. try using this code here in place of your while loop:
int j = 25; //this is what you will be decrementing by.
while(i >= 3)
cout << ' ' << i;
i = i - j; //decrement by 25,22,19,etc...
j = j - 3;//this is your other decrementnc counter, used to
also, these lines here:
i = i - j;
j = j - 3;
can also be written as such:
i -= j; //same as i = i - j
j -= 3; //same as j = j - 3
hope this helps. :)
EDIT: drkybelk got to this one before me ;)
by Derek Elensar: drkybelk posted before me.