如何使用不带参数的函数在学生分数上编写程序:
#import <Foundation/Foundation.h>
void studentMarks(){
}
int main( int argc const char *argv[]) {
}
答案 0 :(得分:1)
使用以下功能:
int c = 0;
- (void)studentMarks {
NSLog(@"%d", c);
}
int main(int argc, const char *argv[]) {
int a = 3, b = 2;
c = a - b;
[self studentMarks];
}