Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Progetto lore
- #include <iostream>
- #include <fstream>
- using namespace std;
- using stringa = char[100];
- int main(){
- stringa filestringa;
- int V[7], soldi, select;
- cout << "Buongiorno, Lorenzo Aldobrandi. Hai " << endl;//UN MODO PER INSERIRE I SOLDI TOTALI DA FILE A TESTO
- cout << "1) Visualizzazione" << endl;
- cout << "2) Inserimento" << endl;
- cout << "3) Azzeramento" << endl;
- do{
- switch (select){
- case 1:
- break;
- case 2:
- break;
- case 3:
- break;
- }
- } while (select != 4);
- cout << "Inserisci da pezzi da 5 a 500" << endl << endl;
- for (int i = 0; i < 7; i++){
- cin >> V[i];
- }
- soldi = V[0] * 5 + V[1] * 10 + V[2] * 20 + V[3] * 50 + V[4] * 100 + V[5] * 200 + V[6] * 500;
- cout << soldi;
- //SO LEGGERE
- ifstream input("ciao.txt");
- while (!input.eof()){
- input.getline(filestringa, 100); //QUESTO FA DA FILE A STRINGA DEVI USARE QUESTO PER FARLO BRUTTO DONWNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNbj<geswonj
- cout << filestringa << '\n'; // E POI LEGGE LA STRINGA ESTRATTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- }
- //Fine
- input.close();
- system("pause");
- }
- //commento bello seui un n no bobnonn
- //6 1 befee
- /*
- #include <iostream>
- #include <fstream>
- using namespace std;
- using stringa = char[100];
- int main(){
- ofstream input("ciao.txt");
- input << "prova prova";
- system("pause");
- }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement