Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1.  
  2. //Progetto lore
  3.  
  4.  
  5. #include <iostream>
  6. #include <fstream>
  7.  
  8. using namespace std;
  9.  
  10. using stringa = char[100];
  11.  
  12. int main(){
  13. stringa filestringa;
  14. int V[7], soldi, select;
  15.  
  16. cout << "Buongiorno, Lorenzo Aldobrandi. Hai " << endl;//UN MODO PER INSERIRE I SOLDI TOTALI DA FILE A TESTO
  17. cout << "1) Visualizzazione" << endl;
  18. cout << "2) Inserimento" << endl;
  19. cout << "3) Azzeramento" << endl;
  20.  
  21. do{
  22. switch (select){
  23. case 1:
  24.  
  25. break;
  26. case 2:
  27.  
  28. break;
  29. case 3:
  30.  
  31. break;
  32. }
  33. } while (select != 4);
  34.  
  35. cout << "Inserisci da pezzi da 5 a 500" << endl << endl;
  36. for (int i = 0; i < 7; i++){
  37. cin >> V[i];
  38. }
  39.  
  40. soldi = V[0] * 5 + V[1] * 10 + V[2] * 20 + V[3] * 50 + V[4] * 100 + V[5] * 200 + V[6] * 500;
  41. cout << soldi;
  42.  
  43. //SO LEGGERE
  44. ifstream input("ciao.txt");
  45. while (!input.eof()){
  46. input.getline(filestringa, 100); //QUESTO FA DA FILE A STRINGA DEVI USARE QUESTO PER FARLO BRUTTO DONWNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNbj<geswonj
  47. cout << filestringa << '\n'; // E POI LEGGE LA STRINGA ESTRATTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  48. }
  49.  
  50. //Fine
  51. input.close();
  52.  
  53. system("pause");
  54. }
  55.  
  56.  
  57. //commento bello seui un n no bobnonn
  58. //6 1 befee
  59.  
  60. /*
  61. #include <iostream>
  62. #include <fstream>
  63.  
  64. using namespace std;
  65.  
  66. using stringa = char[100];
  67.  
  68. int main(){
  69. ofstream input("ciao.txt");
  70.  
  71. input << "prova prova";
  72. system("pause");
  73. }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement