[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
Objective C Programming Tutorial – 19 – Nested if Statements
by
Tags:
Comments
30 responses to “Objective C Programming Tutorial – 19 – Nested if Statements”
-
It should be:
int age;
BOOL sex;
Since it might be a porno site π -
Looks like we have another misogynist tool for the cis gendered patriarchy! This is an outrage! Everyone should donate to my patreon for having to endure this affront to my fascistic SJW feelings.
-
when i run it
-
why can't i type
-
These are the best objective c tuts. I've seen Thanks bucky keep them up please
-
bucky i love you, i feel so amazing because i took it a set further and nested the whole second scanf for sex inside my if statement for age that way both dont always run, the sex one only runs if you pass the age test π so cool
-
the key above the RETURN key does only apply to US keyboards π
on DK keyboards it is ALT + I (I as in i) -
We are here, but too busy learning π
-
truly madly deeply in love with buck's tuts…
-
BUCKY U R AWESOME
-
Everyone is to caught up watching every video after another on fullscreen.
-
lol the interactive transcrpite at 4:50 is halarious
-
Great tutorials Jake Harper!!
-
Another way to do the sex part would be to make it a char variable. Then the prompt would be B for boy and G for girl or something like that.
-
BOOLEAN ALGEBRA NOOOOOOOOO!!! D:
-
cheers
-
Why do you not bother adding the curly brackets? And then how does it know which parts are intended to be encapsulated in the if statement?
-
One thing to note here is that the test for "sex" variable only checks if you're a boy (sex == 1) but if you enter another number, say 4, it will take for granted that you're a girl since sex would be different to 1. you could make another "if" statement inside that last "else"
if (sex == 2)
NSLog(@"welcome girlie");
else
NSLog (@"What are you then?"); -
@marsclips
I was wondering the same thing. messed around with it, and discovered you need to format it differently.The "Go to another website" needs to be after "enter age" and before "enter sex". This will tell the program to print the line "Go to another page" if the first "if" statement is true before it goes on to ask sex.
-
i really thank u ,u are the best teacher and by the way can u make videos about xcode4
-
I still don't know what a nested if statement is.
-
Starting at 7:33. If you type in 103 for age you should get the text "Go to another website" right away and not be asked for your sex anymore since that is part of the first "else" statement. That's at least how I understand it.
-
awesome, i just wish my brain would remember all this tuff, I'm getting dumber as i get older!!
-
2 people need to "Go to another website"
-
@Disabilitor
no it doesnt work
but good try lol -
@omega011536886 He uses XCode
-
whats name the complier u use ? plz
-
you're the boss π I know all this stuff from Delphi, but im still listening to this as you're really the best teacher ever π
-
i think 1 jerk is a jerk who disslikes this video…
-
Python is similar yet so different…at least to me. Python scripting based though so you can just say or instead of ||
Leave a Reply