标签:乘法口诀 code 乘法 color 输入 class ios style blog
闲来无事,写着玩:
oc:
//乘法口诀表输出 for (int i = 1; i<=9; i++) { for (int j = 1; j<=i; j++) { NSLog(@"%dx%d=%d\n",i,j,i*j); } }
swift:
//乘法口诀输入 for i in 1...9 { for j in 1...i { print("\(i)x\(j)=\(i*j)\n") } }
标签:乘法口诀 code 乘法 color 输入 class ios style blog
原文地址:http://www.cnblogs.com/hero11223/p/6681021.html