What is the reason?
When I running my program,without any result,the CMD window open for a moment then close.so I can't see my result of program
This is because the program terminates after running. The simply way to solve this is to add a function which holds the output screen until the user decides to terminate the program. E.g. system("pause"); getch(); getchar(); etc
use any of d functions to hold d screen before any next char input... like getch();
why the program terminates after running???