C Programming Tutorial – 5 – If, Else If, Else Statements

[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –


Posted

in

by

Tags:

Comments

45 responses to “C Programming Tutorial – 5 – If, Else If, Else Statements”

  1. anwarshah abdali Avatar

    how to write a program to scan five marks of the subject and find the following
    A. total marks of the student
    B.average of the marks
    C.result of the student f/p
    D.grade of the studemnts

  2. Surmayee Gupta Avatar

    While using "Else if" condition, it shows an error as – 'else' without a previous 'if' . What should be done?

  3. Taslim Arif Avatar

    It helps a lot bcz i am just fucking bored in c lectures and good thing is ,you don't take much time to make me understands.thanks a lot dear

  4. YOU TUBER'S Avatar

    Hey bucky great to see you man i want some help . can you please make a video or simply tell us how to develop our logics in any programming language .

  5. YOU TUBER'S Avatar

    Becoming horny with your codes bucky 🙂

  6. Nathan B Avatar

    Thanks +thenewboston for this video.

  7. Sean McClary Avatar

    Thanks for these tutorials. I am currently in week 5 of my CMIS class and it's a struggle. This actually helps quite a bit.

  8. kristofer patterson Avatar

    boy u dirty,talking about cougars and dat type a shit,funny though lol,anyway very good video, i am understanding it,i am doing computer science as a subject,i want to become a computer engineer,so it is definitely helping me thank you;COUGAR,HA HA,KEEP IT UP!

  9. karen aradh Avatar

    which program is this ? is this doxbox

  10. Mr. Sela Nuon Avatar

    can you write a programme that talk about discount in a shop?
    if customer buy item

    amount < 50$ discount 5%

    50$ <= amount < 100 discount 15%

    100$ <= amount < 200 discount 25%

    200$ <= amount discount 50%
    Please help me

  11. chuy visente Avatar

    if the if or else condition/comparrison has only one line of code after it. then there is no need for curly braces… right?
    example:
    {……

    if(a==1)
    printf("hello");

    else
    {printf("dude!n");
    printf("fuck_off");
    }
    getch();

    …….}

  12. chuy visente Avatar

    what compiler is this?

  13. shlok patel Avatar

    cant v use only if repeatedly instead of else if?

  14. Trucker494 Avatar

    I wish I had found your videos three years ago

  15. S B Avatar

    Haaahaaha, thank you!

  16. Kartikay Tiwari Avatar

    it helped a lot but plz tell how to use if else with radio buttons

  17. darryl s Avatar

    I am taking my first C programming class and I am still trying to figure out how everything is structured. These videos are awesome, very easy to follow and understand! Keep em coming bro!

  18. Daniel Dolejška Avatar

    gosh.. learn to format your brackets

  19. Peterolen Avatar

    Note that an "else if" is not a special construct in the language. It's just an if statement that has been placed inside another if statement's else part.
    if (age == 40)
    printf("hi");
    else
    if (age == 80)
    printf("hello");
    else
    printf("hola");

  20. Tan Melaka Avatar

    hi I am aldrich from indonesia.. may i know ur email so that i could ask about c programming more to u. thanks

  21. Faruk Miah Avatar

    Cheers dude. Doing comp sci and this helped a lot.

  22. Khalid Alsaadi Avatar

    Hi everyone I have  some problems with c programming language.

  23. Ram Ray Avatar

    I love your videos man
    I am a freshman IT major and your tutorials helped me a lot
    Again thank you

  24. Igrouve Avatar

    Oh, so the difference between using,

    "if, if ,if …" and "if, else if, else if…"

    is that in "if, if ,if …" it would test all conditions in those 'ifs' and even if the preceding 'if' is FALSE it would NOT ignore the remaining 'ifs' and thus, outputs whatever if statement condition is TRUE.

    while for "if, else if, else if…" it would test all conditions in the preceding 'ifs/else ifs' but once it reaches a condition that is TRUE then the remaining 'else ifs' would be ignored.

  25. AJ Harris Avatar

    how would you start another If, Else If, Else statement that follows your first If, Else If, Else statement

  26. Rowan Avatar

    ok, but what if a value is between one another?
    (for example:  2 < age < 5), can you do that, or do you need another command?

  27. Haris Vejzovic Avatar

    Here is the difference between "else if" and "if", answer by @Benjamin de Vries:
    They do the same thing, but the program is only going to test the "else if" if the "if" condition was false. In essence, your pc will allways test the if statement no matter what, but if the condition in the "if" statement is true it's going to skip the "else if" and never even test it.

  28. Jay 88 Avatar

    I understand this faster than my lecture :3

  29. andi ching Avatar

    thanks now i know very clear

  30. ashwiin nedun Avatar

    if else statement for string anyone ? 

  31. king micah Avatar

    can you me help a with grading system code

  32. BlueAppel Avatar

    So what is the actual difference between the "Else if" and the "if" ?

  33. yadavan5861 Avatar

    i just wonder sumtin….wat wil happen if i state my age 45 or 28???it wil show jailbait is it???

  34. Kareen Fantonial Avatar

    REALLY OF GREAT HELP!! XD ZANKS!

  35. Santam Shome Avatar

    When im writing the last else statement the compiler is showing me an error statin that i had not put an if statement before bt i had …please can u help? 

  36. Momoirotoppi Avatar

    This more like it! I understand it more, unlike when my teacher discusses about it, I don't understand one thing T_T.. 

  37. Virus Death Avatar

    SOOOO much better dn lectures.. wat was done in 7 mins here took 2 hrs in college and still went bouncer.. thnx 🙂

  38. Gabriel Badiola Avatar

    int clock = 24, age=null;

    if(age < clock){
      printf("Then you're too young for a cock");
    }else{
      printf("If you know what i mean");
    }

  39. Jason W Avatar

    if(age==18)
    {
         printf("call me for a good time ;)");
    }

  40. jhunphillip123 Avatar

    +Niinja Storm  your int main() I think it needs to have the word void between the two parentheses 

  41. Ahmad Shumayal Avatar

    From your previous video, can I say that 'if' and 'else if' statements do the same thing and can be changed interchangeably?

Leave a Reply

Your email address will not be published. Required fields are marked *