Added: 3 years ago
From: thenewboston
Views: 92,415
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (215)

Sign In or Sign Up now to post a comment!
  • Cheers mate, great vid.. better than my lecturer at uni!!

  • Yeah finally got this one down!

  • I love that voice

  • So when you enter 50, you end up with jailbait. Great and simple tutorial, props for that, but the program itself could do better.

  • it keepS saying my else statement is wrong

  • Guys if you don't know what khan academy is, check it out, it is awesome! it teaches you practically everything, sadly no C, so ya you SHOULD work with em, ty for the awesome

  • Comment removed

  • I didn't understand why he wrote else if instead of just if? Wouldn't only if work too?

  • @Hoihoijooah yes, if will work also, but else if means that if the original if statement is true then dont check else if statment. If He used 2 if statments compiler will check both statments so multiple blocks of code may be executed, hard to explain let me know if you need more help

  • @bondservant4Him thank you for your help, so it's just making computer's job easier. ^_^

  • @Hoihoijooah yes exactly :)

  • I love this guy...anyone can learn this stuff with a teacher who explains it properly like him...BIG THANKS

  • if(age < 10)

    {

    pedobear.molest();

    }

  • printf("Bucky is awesome :D");

  • when i try this i get a bunch of random numbers then it closes

  • @lightningchicken12 message me your code ill tell you whats wrong

  • hey im trying to make a christmas countdown and im getting an error here it is

    13 C:\Users\Jordan\Desktop\coding­\christmas countdown\christmas countdown.c `December' undeclared (first use in this function)

  • Enter your age:

    109

    Jailbait!

  • I'm 13 and an aspiring games programmer, and thanks to your video's i can already program a simple calculator!! thanks dude!! i subbed

  • 7 people skipped the first few tutorials...

  • JAILBAIT

  • Enter your age:

    61

    Jailbait!

  • this guy's a champ

  • where is the source code for this video on your website?

  • Ok, i have a Q I'm trying to learn c++ to code hacks for a game, is there a certain code i need to learn?

  • @Spandex08 I am pretty sure that is correct.

  • mate ,,ur presentation was very nice,, !!

  • great sense of humour and the video helps a lot thanks ! =D

  • Comment removed

  • LULZ at the printf responses.

    Thank you for helping many aspiring programmers such as myself.

  • Is this correct - if (age<18) - is it possible to put it like that less than 18 so if you type 1,2,3 ... 17 it will printf underage for ex.?

  • @Spandex08 Yes, it will.

  • easy cougar? lol this code is simply "COOL"

  • how do you make a pause on something whenever i type 21 i see the message in 1 sec and it exit?

  • @volpexc use getch(); at the end of the code and it will stay open until you type something

  • I think som greater than and less than sign would be good.

  • coding in c is much easier to understand than c++

  • i dont see how a 80 year old is jailbait O_O

  • @13kmakarenko Exactly. Better to use > than ==

    I like the video, but the logic is messed up.

  • try 61.. it will say jailbait lol

  • getchar does not work on this??

  • @paulceltics I thought that too at first, but I made the mistake of how much it needed indented. Check where getch() is in your complier.

  • your examples are very rock! lol

  • lol if he's 22 and his mums 40...his mom was knocked up at 17...

  • Great tutorial, as always. You should look into working with Khan Academy. These videos would be a great addition to that library.

  • awesome teaching!!!!!!  enjoyed learning c from these tutorials,,,,,,,,wanna learn more programming languages from the new boston...keep up the good work

  • @thenewboston....... I am going to need ur help with a programming project.... please... ASAP..

  • thanks for the tutorial man... this can also help me with my just basic programming cause it is so simular to c++... hm maybe i can make the register system i've tried to make... but i still dont know how XD

  • wicked,am loving programming all thanks to you mr bucky

  • I will ace my programming exam now after your videos. Thanks so much man!

  • great tutorial

    helped me much

  • Hey! What is the c compiler that you use?? Its very good. Please suggest any free compiler for windows 7 64 bit

  • Funny examples lol!  Hmm...he's only 22. its awesome!

  • LOL Easy cougar HAHAHA.... speaks good english, makes C programming Extremely EASy to understand and HAS a GOOD SENSE OF HUMOR!!

  • have a website 2!??!!

    sweet

  • thenewboston= he lives in boston (probably)

    go teach in harwood(srry if misspell)

  • wish you were teaching in the crappy CSD UOC(Computer Science Department University of Crete)

  • Would it work to write: if (age<40) ?

    And is there any way you could set a range of values for age? As in between 60 and 40(40<x<60 in mathematical language)?

  • Comment removed

  • @rolandocbf if (60>age>40)

    { printf("I WIN!");  }

    else

    { printf("i lose :(");

    }

    -i surprisingly figured this out on my own.. just played around with it for a bit :)

  • @VaginosaurusRex

    Thanks,and nice job finding that out on your own as well! :D

  • Subbed!

  • you explain in 7 minutes what my teacher CANT explain in 4 hours... and im dont even speak english :D

  • you going to fast

    I cant type that fast

  • type age 100 u will get jailbait ;) lol fail..

  • I looked into your java programing tutorials too, do you use the same examples for everything you do?

  • dude u are awesome

  • ahhmm.. can i ask a question? what if im not using numbers.. what if im using letters.. what will i put? what code is used for letters? is it still int? how about in stating the variable? will i still use "%"?

  • @eahr91 if you are using lettters you need to declare it as char x; and use %c

  • Thank you so much for doing this, i've always wanted to get into programming but whenever i've tried i've run away screaming after the first 'Hello World'. This, on the other hand, i understand perfectly. Hell, i even have an idea for a program you could make using only syntax learned thus far!

  • Comment removed

  • Comment removed

  • Comment removed

  • the funny thing is if u type for example 22 years old it will say: jailbait :D

  • Thanks a lot dude. You are the best!

  • 6:20

    The only instructions you shouldn't follow from this tutorial. xD

  • if ive been to school try learn this, i would give a shit ;p co< school sucks ;p

  • What's the difference between "if" and "else if"? What will change? Nice Tutorials! :D

  • @MisterLaserPointer

    The "else if" conditional only matters if the original "if" conditional turns out to be false. As soon as one conditional is true, the others will not run.

    If you have two or more "if" conditionals, multiple ones could be true at the same time and will all run if true. adding the "else if" and "else" conditionals means that only one action may happen at a time.

  • m' gonna call you professor Greg

  • Heheh, this is why class rooms suck and the Internet rules.

  • Keep your examples pg please!

  • @charmanderstail How the hell is that not PG? If you want to teach a 7 year old how to program do it by yourself, let those of us who are here to learn something do so in a fashion that doesn't bore us shitless.

  • @iswatchi relax it was a joke...

  • nice teacher as well as a nice man too...

    you are the best!!

    you have made thousands of lives using ur knowledge n efficiency...

    a donation from me is sure, within a near future....

    cheeres up!!

  • Comment removed

  • should have made it to if they're older than 60 put "go away" or something

  • what is the difference between ''if'' and ''else if''? if i replace else if with if in this script what will change?

  • Your tutorials are awesome!

  • I use neatbeans, and I tried to do what he's doing but it seems like my compiler doesn't recognize else if :((

    I hate C

  • Hey how could I do this for text, I mean instead of: if age==30 bla bla make it: if age=="lol" bla bla, because when I just do that it skips the then statement I have....

  • lol

  • Brilliant tutorials. Thanks alot man!

  • great job man !!! thanks alot

  • @penguinswaddle1 It's "getch()" not "getchar()"

  • @imvuextrabts its the same.. it just depends of the functions.. some dont recognize "getchar()" but recognizes the "getch()" and some are the other way...

  • @imvuextrabts its the same.. it just depends on the functions.. some dont recognize "getchar()" but recognizes the "getch()" and some are the other way...

  • how come when i press enter it just says what i wanted it to print but then closes?? I have getchar() too. can anyone help please? thanks in advance

  • @penguinswaddle1 if I were you. If your using windows, it would be better if you dual-boot ubuntu and windows. Ubuntu linux has a text editor that can run c and c++ and other programming language in the terminal. In c, just save your program like file_name.c. To compile it in the terminal, just type, "gcc file_name.c -o file_name.run" and after it compiles, type, "./file_name.run". it can run if you use getchar(), getch(), or even even if you dont put any. you can google it. its free.

  • @PSKuwaity || means or (shift + the button to the right of the curly brackets), && means and (13 and 33).

  • i have a question tho...

    why couldn't you just do

    if (age==60) {}

    if (age==23){}

    etc?

    or are you not allowed to do that when you're using a final "else" statement?

  • @LOLHICRONO your right it doesnt mather in this case if you would had like this example

    if (age == 60){

    //result

    }

    if(age <100){ //age lover then 100

    //result

    }

    if your code would look like this and you enter "60" both result will trigger but if you do a else if on the last condition, it wont..

  • @trashkan66 alright thanks.

  • you're awesome man. god bless you for the service you're doing.

  • :P

    I never knew what A cougar meant when I made my name...

  • If you guys wanna learn programming but think it's boring to learn, buy garry's mod!

    Wiremods "Expression 2" will give you a good start. :D

  • Thank you so much for posting this!

    I'm a 15 year old and even though I listen to my teacher, I just don't get the if and else statement, but now I do, thank you! :)

  • really superb job teach us c# toooooo

  • oh, god... teh indentation...

  • You are the best teacher! I wish my professor could learn from you.

  • worlds best teacher

  • Wow!! he is only 22...

    His example seems to be funny... :)

    He gave me all I wanted (related to C)... specially the Dev C++ (I was about to install the RedHat on which we program at school)... Thanks bucky you saved me.... ;)

    Subscribed :D

  • i love bucky

  • Comment removed

  • what's your program that you are executing with ?

    please answer me 

  • @Scatteril

    The programme he's using is Dev C++. Just google it and you'll surely find a download.

  • @Scatteril Dev C++ 4.9.9.2

  • . .thank you so much!!. .

  • easy cougar LOOOL

  • That last statement "Else" you could've just used else if ( age < 18) { printf("jailbait); } but else is the same thing, but just saying..thats another way if its easier for others. since < is less than, anything under 18 would be true.

  • why not

    IF

    IF

    IF

    ELSE

    

  • @manutube8080 I've wondered about that too and I've come up with the answer, if you're still interested. try both ways in your compiler and you'll see that if you use if if if else the else will only be applying to the last if, but if you use if, else if, else, the else will apply to all the conditions mentioned above. Try to make your own "dating site software" and then compare what you get for the age 64 or something, hopefully you'll get it

  • @manutube8080 1: IF only works if true. 2:ELSE only works if false! 3: ELSE IF works in case ELSE fails. But you don't have to use that method. You can use the "Conditional operator"( ? : ), example a == b ? a : b. It means if a is equal to b get the value of a otherwise get b.

  • @manutube8080 with IF... it will check ALL of them... and with ELSE IF... it stops checking when it finds a match.

  • hey Bucky great vid man. You are an inspiration :D

  • @butzloffrost with IF... it will check ALL of them... and with ELSE IF... it stops checking when it finds a match.

  • hey we can use "if " in place of "else if " coz they du the same thing. can we?

  • Comment removed

  • Great tutorial 5/5 , didnt like the example though (num1 , num2 ) thingy

  • best teacher of all time!!! tnx a lot dude

  • Comment removed

  • I think video games use a lot of if, else if statements.

  • @WESKERfromEVIL That and for loops. I hate boss battles in newer games. It's so predictable that it is an atrocity to gamers everywhere. No creativity.

  • Comment removed

  • really great tutorial.. better than Tim Heagarty of VTC! that sonofabitch don't know how to teach

  • Great tutorial series

  • Great except when I push enter my program crashes.

  • thanks bucky for the videos!

  • haha!! The if whooping statement!

    if(whooping cough==10)

    { printf("I'm dying"); }

    else if (whooping cough==5)

    { printf("I still can live"); }

    else (whooping cough==1)

    { printf("thank God!"); }

  • @killseb13 Variables can't have a space in them, so the conventional way to say it would be "whoopingCough" with the two words being squished together and the first letter of the second word being capitalized. Which is also done with more than just 2 words.

  • @crazynoob11 thank you for acknowledging my comment on whoopingCoughs! ^^

  • I used to be a Visual Basic 6 programmer, But C is more fun!

  • @dadeco3

    To make the code more simple and short...

  • why dont you jus write "if" for all the tests instead of "else if"?

  • Comment removed

  • could u please help me anyone , after i finished it all and everything when i type the age like for example i typed 21 nothing happens i press enter and it keeps scrolling down and then i type like for example 60 and then it says whatever i typed at age 21 which was"call me" whats the issue here?

  • Are you running a 186 PC! Your compiler seems very slow.

  • For everyone who is just used to typing one preprocessor, for this you will need the conio.h because if will not recognize system("pause") or getch() after if and else statements.

    Good luck :)

  • thank you so much!!!

    your tutorials are great! :)

  • Why is it, every time I do this it says

    "The system cannot find the file specified?"

  • how do you do between ages so like between 20 to 30 or like that?

  • @maraisjf if (( x > 20 ) && (x < 30 ))

  • Spaghett code just make it one statement because all the curly braces can make things confusing and with devc++ the program will not work

  • I enter your code on dev c++ and it gave me a bunch of errors what did I do wrong I been working on it for about 5 hrs

  • if the if conditions were false the compiler will just bypass the if statements ,,,and same for else if statements and eventually execute print("jailbait"); with or without the else statement it seems kinda redundant there dude,,, good job though,,, and what about the pointers and stuff are there gonna be tutorials about them

  • if i will subscibe is there so more tuturials such as about pointers and what do i actually subscribe to?

    by the way very good explenation

    your are the best i have seen

  • age>=60, age>=40 and age>=21 will prevent numbers in between those from being considered "jailbait" ie, 22 will give you jailbait, 45 will give you jailbait. according to the current logic.

  • whats is easycougar and jailbait means??

  • i wanna ask what is the difference between "Else if " and multi- "if" like the previous tutorial (4),or in the other word,

    why we need to use "Else if " instd of "If....If....If....."

  • i think No difference between "Else if" and "multi if" its another way to use "multi if" and u can figure out that if u write a program once by "Else if"and once by "Mult if"

  • @Hinokari if you have multiple if statements, each branch can potentially be followed. Also, the last "else" would only be associated with the previous if statement.

    (Not a complete program:)

    if (foo > bar) { puts("foo > bar");

    }

    if (foo == 55) { puts("foo == 55");

    }

    Both conditions can be true, but if "else if" were used, only one branch of execution could be followed.

  • @Hinokari it makes your code much more legible. Especially since too many if statements can drive you crazy. It is just a way of keeping all the options within one function, instead of dividing them up to their own functions. too many if statements = spagetti code (messy). else if statements = (awsomeness ) hope that helps. i believe im right.

  • thanks a lot man this really helps

  • How come I have "call me" when I entered 15?? lol

  • how about showing us nested if??? please??