#import <Foundation/Foundation.h>
@interface chengFaBiao : NSObject
-(void)jiuJiuBiao;
@end
@implementation chengFaBiao
-(void)jiuJiuBiao{
NSString *str[10];
str[0]=@"";
for (int i=1; i<10; i++) {
for (int j=1; j<i+1; j++) {
str [ j ]=[[NSString alloc] initWithString:[NSString stringWithFormat:@"%@ %d*%d=%2d ",str[j-1],j,i,i*j]];
}
NSLog(@"%@",str[ i ]);
}
NSLog(@"paoqilaile");
}
@end
int main(int argc, const char * argv[]) {
@autoreleasepool {
chengFaBiao *jiu=[chengFaBiao new];
[jiu jiuJiuBiao];
}
return 0;
}