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.

#include<iostream>
using namespace std;
int main()
{
int i=119;
int subtrahend = 25;
while(i>=3){
cout<<" "<<i;
i-=subtrahend;
subtrahend -=3;
}
system("pause");
return 0;
}

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
//decrement i.
}

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 ;)

Edited
by Derek Elensar: drkybelk posted before me.

I am having a trouble not knowing how to do a java code that will take user string then encrypt it using Elgamal algorithm as following
Elgamal algorithm Pseudo code: ...

A few weeks ago my laptop browsing and windows apps error. When i am on my facebook account i can watch youtube videos posted on feeds but other videos pos ...