Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Func Var and Ops ObjC
//gcc 5.0.4 #import <Foundation/Foundation.h> @interface SampleClass:NSObject - (void)add; - (void)sub; - (void)mul; - (void)div; @end @implementation SampleClass int a=10, b=20; - (void)add { NSLog(@"Addition of %d and %d is %d \n",a,b,a+b); } - (void)sub { NSLog(@"Subtraction of %d and %d is %d \n",a,b,a-b); } - (void)mul { NSLog(@"Multiplication of %d and %d is %d \n",a,b,a*b); } - (void)div { NSLog(@"Division of %d and %d is %d \n",b,a,b/a); } @end int main() { SampleClass *sampleClass = [[SampleClass alloc]init]; [sampleClass add]; [sampleClass sub]; [sampleClass mul]; [sampleClass div]; return 0; }
run
|
edit
|
history
|
help
0
Book NSSet
GetRequest
string mutable
Cylinder And Circle
Class implementation
book
03 Muestra enteros y flotante
find simple Interest in objective c
Objective C NSSet Declaration
Program 2.1