Hey everyone.
I have an exe file that runs a console program that was programmed in C.
during the run of the program the user is asked to enter numbers (using the scanf function).
and the output is being printed to the screen by printf.
The thing is this. I want to make my own txt file with inputs and I want the program to use those inputs.
I also want that the output will be printed to a different txt file – and not in the command window (or in addition to the command windows – I don’t care if it’s both).
how can I do that, in c#? or can I create a *.bat file that will do that? – that would be best.
Another question:
Is there a way to create a *.bat file that will check if two txt files are the same?
Thanks!
Assuming that the program was written to read from
stdin(standard input) and write tostdout(standard output), you should be able to use the following command line: