Running and Using a C# Console Application in PHP

I have a project, I made a console application for my project, but how can I run it in PHP and answer questions?

Sample (Console Application):

enter image description here

Sample (PHP):

<?php $program = shell_exec("c:\program.exe", "test", "test"); echo $program; ?>