In PL/SQL, you don't use the SET operator for assignments. You very, very rarely use it to do things like setting the transaction isolation level in a PL/SQL block. If you're just learning PL/SQL, you can probably safely ignore the existence of SET for a few years.
You can't assign a value to a local variable in the DECLARE section of your block other than as part of the declaration of the variable. If you want myNumber to be initialized to 1, you'd need to specify 1 rather than 0 in the initialization section. If you want to set the value of the variable after initialization, you'd need to do that in the body of the block not in the declarations.
You also almost certainly don't want "\n" in your dbms_output.put_line calls. dbms_output.put_line implicitly includes the new line character. And "\n" is not interpreted as a new line, it's simply interpreted as two characters "\" and "n" so it prints the literal "\n" at the end of every line.
If you want to start from 0, you probably want something like
SQL> ed
Wrote file afiedt.buf
1 DECLARE
2 myNumber INT := 0; -- looks like Ada, or Algol 68 assignment...
3 BEGIN
4 WHILE myNumber < 10 LOOP
5 IF REMAINDER(myNumber, 2) = 0 THEN -- no remainder operator in PL/SQL?
6 -- string concatenation is done with ||
7 DBMS_OUTPUT.PUT_LINE('even number: ' || myNumber || '.');
8 ELSE
9 DBMS_OUTPUT.PUT_LINE('odd number: ' || myNumber || '.');
10 END IF;
11 myNumber := myNumber + 1; -- SET is not allowed here?
12 END LOOP;
13* END;
SQL> /
even number: 0.
odd number: 1.
even number: 2.
odd number: 3.
even number: 4.
odd number: 5.
even number: 6.
odd number: 7.
even number: 8.
odd number: 9.
PL/SQL procedure successfully completed.
If you want to assign a value of 1 before you start your loop, you'd use the := assignment operator in the body of your block
SQL> ed
Wrote file afiedt.buf
1 DECLARE
2 myNumber INT := 0; -- looks like Ada, or Algol 68 assignment...
3 BEGIN
4 myNumber := 1;
5 WHILE myNumber < 10 LOOP
6 IF REMAINDER(myNumber, 2) = 0 THEN -- no remainder operator in PL/SQL?
7 -- string concatenation is done with ||
8 DBMS_OUTPUT.PUT_LINE('even number: ' || myNumber || '.');
9 ELSE
10 DBMS_OUTPUT.PUT_LINE('odd number: ' || myNumber || '.');
11 END IF;
12 myNumber := myNumber + 1; -- SET is not allowed here?
13 END LOOP;
14* END;
SQL> /
odd number: 1.
even number: 2.
odd number: 3.
even number: 4.
odd number: 5.
even number: 6.
odd number: 7.
even number: 8.
odd number: 9.
PL/SQL procedure successfully completed.
INTis also valid, see docs.oracle.com/cd/B10500_01/appdev.920/a96624/… . I triedINTEGERinstead, and I get the same compilation error though.DECLARE myNumber INT;(removing the assignment from this line), but the same error is occurring though.