Some simple programs from K and R book