In addition to being a real C# compiler or calling a real C# compiler, you can only simulate the teacher reading the paper. How to simulate?
Input, output, statement
Given the input, you can compile and execute, you can get the specified output, and then look at the key sentences. Note: The websites above also have strict requirements on how to write your sentences, otherwise you will make mistakes.
******************************************
Supplement:
Ha ha! It seems that everyone understands the problem of OnlineJudge better than I do.
I want to help the landlord, but I didn't read the OnlineJudge system you listed carefully. As soon as I saw your's answer, I knew that what I said was a little beside the point. After careful reading, I found that Widebright-Exploratory Level11is quite right. Just call the server-side compilation command and run it. If there is a compilation error, a CompileError will be given to the client, and you can link to the webpage with the error information. If successful, it will call the compilation result to run. Run if you make a mistake.
What I do is a software that simulates manual reading. In more detail, compilation errors are sometimes inaccurate, and teachers can see wrong statements, such as using undeclared variables. The compiler check will report an error in the position where this variable is used. The teacher will say that you missed a sentence in front of you. That's what I mean when I say look at the keywords in the source program, but the selection of keywords needs the professional level of the questioner.
So, what I said is beside the point. The landlord's request is much simpler.
1. Know how to call an executable file with a program. In C#, it is a system. Starting method of diagnosis process.
2. Know how to compile the source program with commands. Csc is in c#, and the landlord is Passcal.
3. the one who knows how to redirect the output to a file is ">" Redirector, which redirects the compiled result information to a file for reading and displaying to the client.
That's all, the program won't exceed 100 lines.
Let's talk about free source code: Baidu knows that it is a place to answer questions, not a place for people to do it for us. We can study together, but don't ask others about the whole project. For example, your students say, Teacher, why did Pascal become the teaching language? The teacher is willing to answer, and if the students ask: Teacher, Pascal, I don't understand, the exam is coming, please tell me something, and I will be very angry.
On the other hand, open source has the advantages of open source, but it is still not open source that really promotes the development of the industry, just like the development history of the Internet. If no one makes money from it, we may not try its benefits for another 50 years. So I think IT is superficial for children to say that information should be free, just like telling me that the IT industry should enter * * * productism in advance, hehe.