Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main ()
  4. {
  5. int n, num, max, conta, totale, nome;
  6. totale = 0;
  7. conta = 1;
  8. max = 0;
  9. n = 0;
  10. uhmmm:
  11. cout << "inserisci un numero ";
  12. cin >> num;
  13. totale = totale + num;
  14. n=n+1;
  15. if (conta == 0)
  16. max = num;
  17. else if (num > max)
  18. max = num;
  19. cout << "premi 1 per inserire più valori, qualunque altro valore per andare avanti ";
  20. cin >> nome;
  21. if (nome == 1)
  22. goto uhmmm;
  23. cout << "massimo=";
  24. cout << max;
  25. cout << "; totale=";
  26. cout << totale;
  27. return 0;
  28. //mi dispiace per lei se ha dovuto leggere questo abominio
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement