fork download
  1. #include <iostream>
  2. using namespace std;
  3. float voto;
  4. float somma=0;
  5. int main() {
  6.  
  7. for(int i=1; i<=7; i++)
  8. {
  9. cin>>voto;
  10. somma= somma + voto;
  11. }
  12. cout<<"media="<<somma<<endl;
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5316KB
stdin
2 4 6 8 1 3 5 7 
stdout
media=29