Skip to content

Instantly share code, notes, and snippets.

View lollofra's full-sized avatar

Lorenzo Fiocco lollofra

View GitHub Profile
@lollofra
lollofra / Combinazioni binarie.cpp
Last active April 5, 2018 10:46
Stampa il numero e tutte le combinazioni possibili che si possono avere con un tot di bit dati da input
//Combinazioni binarie.cpp: Stampa il numero e tutte le combinazioni possibili che si possono avere con un tot di bit dati da input
/* * Copyright © 2017-2018 Lorenzo Fiocco <fiocco@giallo.it>
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://www.wtfpl.net/ for more details. */
#include <iostream>
using namespace std;
@lollofra
lollofra / Codifica di linea.cpp
Last active May 29, 2018 06:23
Effettua la codifica di un byte inserito da input
//Codifica di linea.cpp: Effettua la codifica di un byte inserito da input
/* * Copyright © 2017-2018 Lorenzo Fiocco <fiocco@giallo.it>
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://www.wtfpl.net/ for more details. */
#include <iostream>
using namespace std;
@lollofra
lollofra / Palindroma ricorsiva.cpp
Last active April 5, 2018 10:46
Vede se una parola è palindroma o meno usando una funzione ricorsiva
//Palindroma ricorsiva.cpp: Vede se una parola è palindroma o meno usando una funzione ricorsiva
/* * Copyright © 2017-2018 Lorenzo Fiocco <fiocco@giallo.it>
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://www.wtfpl.net/ for more details. */
#include <iostream>
using namespace std;
@lollofra
lollofra / BusCotral.cpp
Last active January 15, 2019 10:26
Work in Progress
#include <iostream>
#include <string>
#include <sstream>
#include <curlpp/cURLpp.hpp>
#include <curlpp/Easy.hpp>
#include <curlpp/Options.hpp>
#include <pugixml.hpp>
int main(){
long flags = CURL_GLOBAL_ALL;
@lollofra
lollofra / Palindroma.cpp
Last active May 29, 2018 06:36
Vede se una parola è palindroma o meno usando una funzione
//Palindroma.cpp: Vede se una parola è palindroma o meno usando una funzione
/* * Copyright © 2017-2018 Lorenzo Fiocco <fiocco@giallo.it>
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://www.wtfpl.net/ for more details. */
#include <iostream>
using namespace std;
@lollofra
lollofra / NomeCheVePare.java
Created October 26, 2017 16:29
Quello che la prof Cozza non vi dice... CLICCA QUI PER SCOPRIRE LA VERITÀ
import java.io.*; //Fatelo e basta
public class NomeCheVePare {
public static void main(String[] args) {
InputStreamReader input = new InputStreamReader (System.in); //Ci servira in seguito per l'input
BufferedReader tastiera = new BufferedReader (input); //Come sopra
int Numero; //Per creare una variabile intera
int Vettore[] = new int [2]; //Per creare un vettore da 2
int Matrice[][] = new int [3][2]; //Per creare una matrice 3x2
@lollofra
lollofra / Pedo infame.cpp
Last active March 21, 2022 18:19
Programma in C++ che ti dice sei punibile dalla legge italiana (Art. 609 CP) per atti sessuali con minorenne di una data età
//Pedo infame.cpp: Programma in C++ che ti dice sei punibile dalla legge italiana (Art. 609 CP) per atti sessuali con minorenne di una data eta'
/* * Copyright © 2017-2021 Lorenzo Fiocco <fiocco@giallo.it>
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://www.wtfpl.net/ for more details. */
#include <iostream>
using namespace std;
@lollofra
lollofra / School statistic.cpp
Last active January 16, 2018 12:32
Programma in C++ per calcolare varie statistiche dell'andamento di un istituto scolastico ed esportare i dati necessari in un file di testo.
#include <iostream>
#include <string>
#include <iomanip>
#include <fstream>
using namespace std;
int main(){
int cla=0; //Variabile n. di classi
string name; //Stringa per il nome dell'istituto
cout << "Inserisci il nome dell'istituto:";