" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
#include <iostream>
using namespace std;
int main(){ float suma=0, n=0, a=0;
for(;;) { cin>>a; if(a == 0) break; else { n++; suma+=a; } } cout<<suma/n; return 0;}
Schemat w załączniku.