Код для поиска

Lesson 58-1: Reading Multidimensional Array Values

Lesson 58-1: Reading Multidimensional Array Values

474-Lesson 58: What is a multidimensional array? Example of an RGB LED
Язык: C++
/*
 * Lesson 58: What is a multidimensional array? RGB LED example
 * Example from the video to print values of a multidimensional array.
 
 Watch video for full details of this code: https://youtu.be/YuGJpFeoq5I
 * 
 * Written by Ahmad Shamshiri on October 20, 2019 at 14:58
 * in Ajax, Ontario, Canada. www.robojax.com
 * 
 * 
 * 
 * Get this code and other Arduino codes from Robojax.com.

If you found this tutorial helpful, please support me so I can continue creating 
content like this. 

or make a donation using PayPal http://robojax.com/L/?id=64

 *  * This code is "AS IS" without warranty or liability. Free to be used as long as you keep this note intact.* 
 * This code has been downloaded from Robojax.com
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

// Defining a three-dimensional array with 3 rows
int shapes[3][3] = {
		{16, 8, 9},
		{23, 10, 7},
		{41, 17, 19}
			};



void setup() {
  Serial.begin(9600);
  Serial.print("3x3 Array");
  Serial.println(shapes[1][1]);//prints 10
  Serial.println(shapes[0][0]);//prints 16 
  Serial.println(shapes[2][2]);//prints 19
  Serial.println(shapes[2][0]);//prints 41 
   
}


void loop() {
// robojax.com loop has nothing.
  
}

Ресурсы и ссылки

Ресурсов пока нет.

Файлы📁

Нет доступных файлов.