become an xcode 续
第七章:循环1:for
循环次数必须是整数,因为你没有办法循环2.7次
int x; for (x = 1; x <= 10; x++) { NSLog(@"Julia is a pretty actress."); } NSLog(@"The value of x is %d", x);
2:while () { }和do {} while ()
int counter = 1; while (counter <= 10) { NSLog(@"Julia is a pretty actress.\n"); counter = counter + 1; } NSLog(@"The value of counter is %d", counter);
int counter = 1; do { NSLog(@"Julia is a pretty actress.\n"); counter = counter + 1; } while (counter <= 10); NSLog(@"The value of counter is %d", counter);
第八章:带有图形界面的程序
<div class="quote_title">写道
页:
[1]