How to tell a student that s/he should enroll in a different program?
Don't tell them anything. Ask pointed questions.  Ask why they chose this course, or this major.  Ask where they expect to be in a year or in five years.  Make them talk through their plans.  Let them find the gaps in it.

This past semester, I asked every single student that came in to my office to change majors to CS (or to IT) the same first question: "Why?"  Some students had a great immediate answer, and I signed the form right away.  With others, we had a 20 minute conversation.  Some of them said they're in it for the money, and I would say things like "You'll make more money as a plumber, and you don't need college for that."  "Oh, but my dad said-"  "But what do you want?"

It's like helping them learn to debug.  Let them come to the decision.