#include <iostream>
#include <string>
#include <vector>
- iostream: Fornisce le funzionalità di input/output di base, come
cin
ecout
. - string: Definisce la classe
string
per manipolare sequenze di caratteri.
#include "DHT.h" | |
DHT dht(2,DHT11); | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(9600); | |
dht.begin(); | |
} |
#include <iostream> | |
#include <array> | |
using matrice4x3 = std::array<std::array<int,4>,3>; | |
using 😊 = int; | |
int main() { | |
matrice4x3 mat; | |
//std::array<std::array<int,4>,3> mat; |
#include <iostream> | |
#include <vector> | |
#include <optional> | |
bool esiste(const std::vector<int>& v,int value) { | |
for(auto i =0; i < v.size(); i++) { | |
if (v[i] == value) { | |
return true; | |
} |
#include <array> | |
#include <vector> | |
#include "raylib.h" | |
#define SCREEN_WIDTH 1000 | |
#define SCREEN_HEIGHT 800 | |
using pallina_info = std::array<float,4>; |
#include <vector> | |
#include "raylib.h" | |
#define SCREEN_WIDTH 800 | |
#define SCREEN_HEIGHT 450 | |
#define CELL_SIZE 2 | |
#define GRID_WIDTH (SCREEN_WIDTH / CELL_SIZE) | |
#define GRID_HEIGHT (SCREEN_HEIGHT / CELL_SIZE) |
#include <vector> | |
#include "raylib.h" | |
const int screen_width = 800; | |
const int screen_height = 450; | |
const int tile_size = 20; | |
const int righe = screen_height/tile_size; | |
const int colonne = screen_width/tile_size; | |
int n_celle_vive(const std::vector<bool>&world,int col, int row) { |
#include <vector> | |
#include "raylib.h" | |
const int screen_width = 800; | |
const int screen_height = 450; | |
const int tile_size = 20; | |
//------------------------------------------------------------------------------------ | |
// Program main entry point |
#include <vector> | |
#include "raylib.h" | |
const int screen_width = 800; | |
const int screen_height = 450; | |
const int tile_size = 20; | |
//------------------------------------------------------------------------------------ | |
// Program main entry point |
/*Siamo al polo Nord e Babbo Natale ci ha incaricati di sorvegliare i lavori per la notte del 24 dicembre. | |
Dobbiamo sorvegliare il lavoro di tutti gli elfi. | |
Ad ogni elfo chiediamo quanti giocattoli ha prodotto per Natale. | |
Vogliamo calcolare: | |
1) il totale dei giocattoli | |
2) la media dei giocattoli realizzati dagli elfi | |
3) la posizione nel vettore (cioè indice cioè la i) dell'elfo che ha prodotto più giocattoli | |
4) quanti elfi hanno prodotto più giocattoli della media | |
5)creare un menu (con uno switch) che in base al valore scelto permette di svolgere i punti 1, 2, 3, 4. | |
BISOGNA RESTARE NEL MENU FINO A CHE UNO NON SCEGLI DI USCIRE |