Update ex013.c

the final version with errors corrected.