C# arrays 🚗

แชร์
ฝัง

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

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

    using System;
    namespace MyFirstProgram
    {
    class Program
    {
    static void Main(string[] args)
    {
    // array = a variable that can store multiple values. fixed size
    //String[] cars = {"BMW", "Mustang", "Corvette"};
    String[] cars = new string[3];
    cars[0] = "Tesla";
    cars[1] = "Mustang";
    cars[2] = "Corvette";
    for (int i = 0; i < cars.Length; i++)
    {
    Console.WriteLine(cars[i]);
    }
    Console.ReadKey();
    }
    }
    }

    • @officialmoai3107
      @officialmoai3107 5 หลายเดือนก่อน

      Thank you, Sir!

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

      string[] themaRondes = { "Sport", "Cultuur", "Politiek" };
      int aantalTeams = 4;
      string[] teamNamen = new string[aantalTeams];
      int[,] scores = new int[aantalTeams, themaRondes.Length];
      // Namen en scores invoeren
      for (int i = 0; i < aantalTeams; i++)
      {
      Console.Write($"Voer de naam in van team {i + 1}: ");
      teamNamen[i] = Console.ReadLine();
      for (int j = 0; j < themaRondes.Length; j++)
      {
      Console.Write($"{teamNamen[i]}, {themaRondes[j]} score: ");
      scores[i, j] = int.Parse(Console.ReadLine());
      }
      }
      // Winnaars per ronde bepalen
      for (int j = 0; j < themaRondes.Length; j++)
      {
      int hoogsteScore = -1;
      string winnaar = "";
      for (int i = 0; i < aantalTeams; i++)
      {
      if (scores[i, j] > hoogsteScore)
      {
      hoogsteScore = scores[i, j];
      winnaar = teamNamen[i];
      }
      }
      Console.WriteLine($"
      Winnaar van de {themaRondes[j]} ronde is: {winnaar} met {hoogsteScore} punten.");
      }

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

      @@officialmoai3107 // Thema's en teams
      string[] themaRondes = { "Sport", "Cultuur", "Politiek" };
      int aantalTeams = 4;
      string[] teamNamen = new string[aantalTeams];
      int[,] scores = new int[aantalTeams, themaRondes.Length];
      // Namen en scores invoeren
      for (int i = 0; i < aantalTeams; i++)
      {
      Console.Write($"Voer de naam in van team {i + 1}: ");
      teamNamen[i] = Console.ReadLine();
      for (int j = 0; j < themaRondes.Length; j++)
      {
      Console.Write($"{teamNamen[i]}, {themaRondes[j]} score: ");
      scores[i, j] = int.Parse(Console.ReadLine());
      }
      }
      // Winnaars per ronde bepalen
      for (int j = 0; j < themaRondes.Length; j++)
      {
      int hoogsteScore = -1;
      string winnaar = "";
      for (int i = 0; i < aantalTeams; i++)
      {
      if (scores[i, j] > hoogsteScore)
      {
      hoogsteScore = scores[i, j];
      winnaar = teamNamen[i];
      }
      }
      Console.WriteLine($"
      Winnaar van de {themaRondes[j]} ronde is: {winnaar} met {hoogsteScore} punten.");
      }

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

    The comparison to variables made this so much easier to understand. Thank you for simplifying this so much.

  • @MoodyHL
    @MoodyHL ปีที่แล้ว +7

    Bro code is an absolute legend bro. Explaining stuff way better than my profs in college.

  • @javidwaldron8377
    @javidwaldron8377 5 หลายเดือนก่อน

    Dont usually go out of my way to comment but you are a blessing man, taking a coding class for grad school and youre helping me feel like im not gonna fail. best easy to understand quick tutorials

  • @FeenickzVR
    @FeenickzVR 5 หลายเดือนก่อน

    I know a bit of java, but since Im wanting to become a game dev, these tutorials have been helping me learn a lot of the classes used in C# since I already know the syntax

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

    Honestly, Thank you so much for this. You simplified this subject matter to a point where I can comprehend the need for an array. How could we support you; do you have a bootcamp or anyway I can donate to you?

  • @spartanranger
    @spartanranger 2 ปีที่แล้ว

    Thanks for the video Bro.

  • @repairstudio4940
    @repairstudio4940 5 หลายเดือนก่อน

    Great vid!🎉

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

    Ahh, I love the bass sound when you are typing! ASMR Coding!

  •  3 ปีที่แล้ว

    Thanks Bro!

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

    The late night coding sessions is what I live for

  • @samer_is_code_it_now
    @samer_is_code_it_now 8 หลายเดือนก่อน

    thank u man

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

    SOS GOD FLACO

  • @MsKillaDJ
    @MsKillaDJ 8 หลายเดือนก่อน

    Thanks this made everything click

  • @Ronnyxxedit
    @Ronnyxxedit 5 หลายเดือนก่อน

    Thank you ❤

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

    my brain has blowed up lol

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

      That means it's working

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

    So there is no Array in the stack in C#. Is everything in a heap?

  • @zacksc2574
    @zacksc2574 10 หลายเดือนก่อน +1

    How long did it take you to be the amazing at coding ?

  • @user-gk9fn8pu1f
    @user-gk9fn8pu1f 10 หลายเดือนก่อน

    top

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

    noice

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

    I got an exam tomorrow thanks dude hahah

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

      good luck

  • @ahmedhassan5783
    @ahmedhassan5783 8 หลายเดือนก่อน

    done

  • @whitedinamo
    @whitedinamo 2 ปีที่แล้ว

    lesson check😇