for(i in 1:9){ for(j in 1:i){ cat(j,"x",i,"=",i*j,'\t',file="../九九乘法表.txt",append=TRUE) } cat("\n",file="../九九乘法表.txt",append=TRUE) }