C++ QUIZ GAME for beginners 💯

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.พ. 2025
  • #C++ #quiz #game
    C++ quiz game tutorial project example explained

ความคิดเห็น • 27

  • @BroCodez
    @BroCodez  2 ปีที่แล้ว +34

    #include
    int main() {
    std::string questions[] = {"1. What year was C++ created?: ",
    "2. Who invented C++?: ",
    "3. What is the predecessor of C++?: ",
    "4. Is the Earth flat?"};
    std::string options[][4] = {{"A. 1969", "B. 1975", "C. 1985", "D. 1989"},
    {"A. Guido van Rossum", "B. Bjarne Stroustrup", "C. John Carmack", "D. Mark Zuckerburg"},
    {"A. C", "B. C+", "C. C--", "D. B++"},
    {"A. yes", "B. no", "C. sometimes", "D. what's Earth?"}};
    char answerKey[] = {'C', 'B', 'A', 'B'};
    int size = sizeof(questions)/sizeof(questions[0]);
    char guess;
    int score;
    for(int i = 0; i < size; i++){
    std::cout

    • @lalkad8561
      @lalkad8561 ปีที่แล้ว +2

      #include
      int main(){
      std::string questions[] = { "1. It is now 2023, what year will it be in 5 years if the fourth quarter of the 21st century is over?: ",
      "2. Who invented the Sherlock Holmes character?: ",
      "3. Who invented Facebook?: ",
      "4. Which nationality is Alfred Korzybski?: "};
      std::string options[][4] = {{"A. 2128", "B. 2005", "C. 2105", "D. 2024"},
      {"A. William Shakespear", "B. Sherlock Holmes was a real person!!!", "C. Izzy Einstein and Moe Smith", "D. Arthur Conan Doyle"},
      {"A. Mark Zuckerberg", "B. Steve Jobes", "C. Michael Gerard Tyson", "D. Bro Code"},
      {"A. American", "B. Irish", "C. Russian", "D. Polish"}};
      char answerKey[] = {'C', 'D', 'A', 'D'};
      int size = sizeof(questions)/sizeof(questions[0]);
      char guess;
      int score;
      for(int i = 0; i < size; i++){
      std::cout

    • @danilod.olescojr.9445
      @danilod.olescojr.9445 ปีที่แล้ว

      😮

    • @kellythestoryteller
      @kellythestoryteller ปีที่แล้ว

    • @AlfiNR
      @AlfiNR ปีที่แล้ว

      i make question math

  • @dortcel5550
    @dortcel5550 2 ปีที่แล้ว +12

    you're one hell of a teacher😂😂. huge respect bro

  • @siddharthjain6629
    @siddharthjain6629 2 หลายเดือนก่อน

    What A Nice Quiz

  • @hiddenbillionaire233
    @hiddenbillionaire233 ปีที่แล้ว +18

    With my compiler I have to initialize the int score =0; otherwise it is something like 6422284 hahaha

    • @Warzell
      @Warzell 6 หลายเดือนก่อน +1

      Thank you so much I couldn't figure out why my score kept being like 32k

    • @amizo2121
      @amizo2121 3 หลายเดือนก่อน

      omg tq sm

    • @IkraanFarxaan-b8s
      @IkraanFarxaan-b8s 24 วันที่ผ่านมา

      thank you so much 🍀

  • @lealemb
    @lealemb ปีที่แล้ว +1

    what an interesting teacher you are bro. thank you

  • @andriibear
    @andriibear ปีที่แล้ว

    a really nice tutorial, thanks. One quedtion, you know it would be really nice if you create a tutorial on how to create a non console game in c++

  • @_killer_designs
    @_killer_designs 6 หลายเดือนก่อน +2

    for those getting a weird score returning (like 32064) make sure you initialize "int score = 0"

  • @WangBingzheng
    @WangBingzheng 2 หลายเดือนก่อน

    one question : why the option[][4],the 4 is in the columns , instead of the rows?

  • @faltuyoutuber4570
    @faltuyoutuber4570 7 หลายเดือนก่อน +3

    video is 1 month old, then how are comments upto a year old?

  • @миринмирин
    @миринмирин ปีที่แล้ว +2

    ALSO! If you want to use multiple decimal places, use: std::cout

  • @Mendamar-uv4jg
    @Mendamar-uv4jg 7 หลายเดือนก่อน +1

    Dude, everyone can edit wikipedia. It is unreliable source. Earth is definitely flat sometimes.

  • @FrederikWollert
    @FrederikWollert 9 หลายเดือนก่อน

    Nice Video. But you misspelled the Zuck wrong. It's Zuckerberg.

  • @code-charm-linux
    @code-charm-linux 8 หลายเดือนก่อน

    how would I code an incorrect option block?, i tried using dowhile and while loop, it doesnt work

  • @shukurullomeliboyev2004
    @shukurullomeliboyev2004 ปีที่แล้ว +3

    where is code of this quiz test ?

  • @HunaBopa
    @HunaBopa ปีที่แล้ว

    Bro, unfortunately the creator of C++ has seen your this tutorial (2:16/11:45) and is angry to see you misspell his name. His soul says he will forgive you provided that you create an auto-spelling app in C++ and make it open sourced. What would you say Bro?