C++ Tutorial – 21 – Switch Statement

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


Posted

in

by

Tags:

Comments

25 responses to “C++ Tutorial – 21 – Switch Statement”

  1. New channel Avatar

    thank u sooooo muchhhhh!!!!

  2. Lokcies Avatar

    so i can only use int,but not double,float ?

  3. Siniša Kragulj Avatar

    what is the difference between int main and void main?

  4. Howard David Avatar

    I happen to have lost a leg in an accident and I would like to tell you that I am very offended that you would suggest that those without 2 legs are not human. I have you know that I am not a pirate and I am outraged at your insensitive microaggressions, I feel an apology is very much due or else I might just have to report this video

  5. Norah Isaboke Avatar

    1. Write a C++ program to input marks of five subjects Physics, Chemistry, Biology, Mathematics and Computer. Calculate the average and grade according to following: (10 marks)
    Percentage >= 90% : Grade A
    Percentage >= 80% : Grade B
    Percentage >= 70% : Grade C
    Percentage >= 60% : Grade D
    Percentage >= 40% : Grade E
    Percentage < 40% : Grade F
    a. Using if … else
    b. Using switch
    someone help me out

  6. Anas Hawasli Avatar

    so simple thank you !

  7. Squo Crawford Avatar

    what IDE are you using?

  8. Chris K Avatar

    Just wanted to say thanks man, I've been falling behind in my class and this really helped me out.

  9. Deni Susanto Avatar

    Any idea of case that required this switch case functions instead of if function? because i cant see a good case example where this function would be more effective to use.

  10. resoof Avatar

    uum… pirates are humans. so you are human is a general case for both 1 and 2 legs.. you should have said "you are not a pirate" or you are an ordinary human" or something like that

    But the video was amazing thanks for explaining! 🙂

  11. Sergio Avatar

    Can you use || or && in the case?

  12. thank him and Avatar

    instead of I don't know who u r..I have written you r an alien…will the program run…..

  13. Robert Carlton Avatar

    as an amputee, case 1 got me hype

  14. Jerald Blefgh Avatar

    Thanks for letting me know about the break statement. I had a switch statement in which all cases had output, so as you could imagine, I got a lot of spam. 😀

  15. Usman Sajjad Avatar

    how would you use if theres an greater then condition?

  16. advancedlamb Avatar

    Wow, pirates aren't humans? Monstrous.

  17. Sahl Ebrahim Avatar

    can I execute switch case inside if function

  18. kirollos magdy Avatar

    how to make a calculator with switch statment

  19. The New Gamer Avatar

    But how can i do this with people names like case bucky or case mark or sth else

  20. q zorn Avatar

    A good case of switch. thanks. 8~7 .

  21. Ken Francis Avatar

    This is so much easier than the if/else statements omg. I should've learned this weeks ago LOL.

  22. Hazel Ablan Avatar

    it is possible that in the case statement the if else statement are included?

  23. Lawrence Nieto Avatar

    Great tutorial!
    I have a question regarding the default part. If you type in a number that is not "1" or "2", it will say that it won't know what you are.
    However, what if you don't type in a number at all? What if you typed in a letter? Is there any way you can make sure the program will validate your input and make sure it is only a number? Thank you!

Leave a Reply

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