Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple math #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions objc-simple-math/FISAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,45 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
* Write your code here.

*/
NSInteger i = 1 + 1;

NSLog(@"i: %li", i);
i=5 + 8;
NSLog(@"i: %li", i);
i=10 - 8;
NSLog(@"i: %li", i);
i=8 - 10;
NSLog(@"i: %li", i);
i=2 * 3;
NSLog(@"i: %li", i);
i=3 * 5;
NSLog(@"i: %li", i);
i=-3 * 5;
NSLog(@"i: %li", i);
i=10 / 5;
NSLog(@"i: %li", i);
i=10 / 3;
NSLog(@"i: %li", i);
i=-3 / -5;
NSLog(@"i: %li", i);
NSInteger a = 0;
NSInteger b = 0;
NSInteger c = a + b;
NSLog(@"a: %li, b: %li, c: %li", a, b, c);
a = 17;
NSLog(@"a: %li, b: %li, c: %li", a, b, c);
b = 29;
NSLog(@"a: %li, b: %li, c: %li", a, b, c);
c = a + b;
NSLog(@"a: %li, b: %li, c: %li", a, b, c);
c = a - b;
NSLog(@"a: %li, b: %li, c: %li", a, b, c);

c = a * b;
NSLog(@"a: %li, b: %li, c: %li", a, b, c);
c = a / b;
NSLog(@"a: %li, b: %li, c: %li", a, b, c);

// do not alter
return YES; //
///////////////
Expand Down
5 changes: 3 additions & 2 deletions objc-simple-math/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="uaL-Iq-kMv">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15G1004" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="uaL-Iq-kMv">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--View Controller-->
Expand Down