If I say 'This computer program (suppose C/C++ program) is logically erroneous', would it be correct?
It's understandable, but if your goal is to sound natural, then there are some good alternatives.
Assuming you want to keep the same sentence structure, then I would prefer
- logically flawed
- logically incorrect
- logically wrong
If you are open to changing the structure, then I feel like some more natural expressions are
- This computer program's logic is flawed.
- This computer program's logic is wrong
- This computer program's logic is incorrect.
So all in all, I would prefer the verb flaw.
The English Oxford Dictionary defines logically as, 'According to the rules of logic or formal argument.'
The English Oxford Dictionary defines erreneous as, 'Wrong; incorrect.'
With these two definitions in mind, it's possible that a program can be logical but still be incorrect.
If, for example, you created a program that displayed the number seven, when it should have displayed the number eight, the code itself could be logical and 'according to the rules of logic,' but it would also be 'incorrect.'