: I tried using Actors but it isn't working. It says the words
: "write" and/or "read" aren't declared.
Your request was for an algorithm in pseudo code. By definition pseudo code is not likely to compile. "write" and "read" are generic terms and you need to translate into whatever the equivalent is in the language you are using.
I've no idea what CH is but if you are using cin and cout it seems you are using something similar to C++, which would look something like this.
main()
{
int x, count ;
cin >> x ;
count = 0 ;
while (count <= x){
cout << x ;
count += 2 ;
}