What error are you getting - compiler/runtime? I can see that scanf might be an issue as you don't include <cstdio> (I'm unclear if <conio.h> does that for you). Also, you are mixing input mechanisms (cin and scanf) - it is best to pick one and be consistent.
Also, you posted a code snippet. You should not post questions like these as code snippets but as new questions.