solve code generate and display