Objective c 分数之间的加减乘除 …
来源:互联网 发布:网络调教女m的任务详细 编辑:程序博客网 时间:2024/05/16 06:30
//
//
//
//@IOS荣天
//
//
//
#import<Foundation/Foundation.h>
@interface Fenshu : NSObject
{
}
@property (nonatomic,assign)int fenzi;
@property (nonatomic,assign)int fenmu;
//自定义类的初始化方法
+ (id)fenshuWithFenzi:(int)newFenzi Fenmu:(int) newFenmu;
- (id)initWithFenzi:(int) newFenziFenmu:(int) newFenmu;
//加法
- (Fenshu *)jiafa:(Fenshu*)num1;
//减法
- (Fenshu *)jianfa:(Fenshu*)num1;
//乘法
- (Fenshu *)chengfa:(Fenshu*)num1;
//除法、
- (Fenshu *)chufa:(Fenshu*)num1;
//约分方法
- (Fenshu *)yuefen:(Fenshu*)num1;
//最大公约数
- (int)shuMax:(Fenshu *)num1;
@end
2.
//
//
//
//
//
//
//
#import "Fenshu.h"
@implementation Fenshu
@synthesizefenzi=_fenzi, fenmu=_fenmu;
+ (id)fenshuWithFenzi:(int)newFenzi Fenmu:(int) newFenmu
{
}
- (id)initWithFenzi:(int) newFenziFenmu:(int) newFenmu
{
}
//加法
- (Fenshu*)jiafa:(Fenshu *)num1
{
}
//减法
- (Fenshu*)jianfa:(Fenshu *)num1
{
}
//乘法
- (Fenshu*)chengfa:(Fenshu *)num1
{
}
//除法、
- (Fenshu*)chufa:(Fenshu *)num1
{
}
//约分方法
- (Fenshu*)yuefen:(Fenshu *)num1
{
}
//最大公约数
- (int)shuMax:(Fenshu *)num1
{
}
@end
3.
//
//
//
//@IOS荣天
//
//
//
#import<Foundation/Foundation.h>
#import "Fenshu.h"
int main (int argc, const char * argv[])
{
}
- Objective c 分数之间的加减乘除 …
- IOS Objective c 同步 异步链接 …
- Improved logging in Objective-C …
- 【Objective-C 语言】1 …
- 【Objective-C 语言】2 …
- 【Objective-C 语言】3 …
- 【Objective-C 语言】4 …
- 【Objective-C 语言】5 …
- 【Objective-C 语言】6 …
- 【Objective-C 语言】7 …
- 【Objective-C 语言】8 …
- 【Objective-C 语言】9 …
- 【Objective-C 语言】1 …
- Objective C 监听 通知
- objective-c 获取时间的方法
- objective-c 截取字符串 数组 字典…
- objective-c 根据身份证 计算出年…
- objective-c 如果使用了release …
- objective-c 根据身份证 计算出年…
- objective-c 如果使用了release …
- iOS上一种图书翻页效果的实现(Lea…
- objective-c中import与@class的说…
- ios BOKE
- Objective c 分数之间的加减乘除 …
- Objective c KVO/KVC做了简单的…
- Objective-c类别
- Objective c 数组NSArray
- 后缀数组,字符串中连续出现最多的字串
- Objective C 监听 通知
- objective c 协议 代理
- objective-c 数组转变为字符串 …
- Hibernate单向无连接表1-1关联的简单示例